Cron or systemd timers

35 views
Skip to first unread message

Arild

unread,
Nov 26, 2019, 8:10:42 AM11/26/19
to qubes-users
I'm interested in running a script in dom0 at 30 min intervals, but it seems that cron and systemd timers might be limited in dom0. Is that true?
In the documentation I have seen a cron.daily and cron.weekly, but I would like a little more options than that.
Any suggestions what might work?
Thanks,
Arild

Claudia

unread,
Nov 26, 2019, 5:48:34 PM11/26/19
to qubes...@googlegroups.com, hoff...@gmail.com
Arild:
> I'm interested in running a script in dom0 at 30 min intervals, but it
> seems that cron and systemd timers might be limited in dom0. Is that true?

I'm not sure I understand. Limited how?

You should be able to make a .service file and set up your .timer file like:
[Timer]
OnCalendar=*-*-* *:00:00,30

As far as I know, it's the same in Qubes as in any other systemd Linux.
If you want to schedule commands in VMs, you can create a timer in dom0
that runs the `qvm-run` command which will start the specified VM and
run a command inside of it.

https://dev.qubes-os.org/projects/core-admin-client/en/latest/manpages/qvm-run.html

> In the documentation I have seen a cron.daily and cron.weekly, but I would
> like a little more options than that.
> Any suggestions what might work?
> Thanks,
> Arild
>

Those are pre-set intervals that are set up for you out of the box, but
you can create custom schedules with a crontab file.

https://wiki.archlinux.org/index.php/Cron#Crontab_format

Or, you can use systemd timer files.

https://wiki.archlinux.org/index.php/Systemd/Timers

-------------------------------------------------
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!

hoff...@gmail.com

unread,
Nov 27, 2019, 2:13:19 PM11/27/19
to qubes-users

Thanks, it's working. I'm not sure what I was doing wrong!
Reply all
Reply to author
Forward
0 new messages