Niels Kobschätzki
unread,Jul 17, 2016, 1:33:06 AM7/17/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to qubes-users
Hi,
since I prefer systemd-timers over cron jobs (systemctl list-timers is great and
they log automatically to journalctl), I created a service and a timer for it. I have no
idea what would be the best way to create a pull-request for them, so I post
them here:
When you create them yourself you can put them in /etc/systemd/system
qubes-sync-clock.service
[Unit]
Description=This syncs the clock
[Service]
type=simpel
ExecStart=/usr/bin/qvm-sync-clock
[Install]
WantedBy=default.target
qubes-sync-clock.timer
[Unit]
Description=Sync the clock every 6 minutes
[Timer]
Persistent=false
OnBootSec=15
OnCalendar=*:0/6
Unit=qubes-sync-clock.service
[Install]
WantedBy=timers.target
When you have both files:
systemctl start qubes-sync-clock.service
systemctl enable qubes-sync-clock.service
systemctl start qubes-sync-clock.timer
systemctl enable qubes-sync-clock.timer
When you want to see when the timer ran the last time and will run the next
time:
systemctl list-timers
And when there is something to log, it is in the journal (journalctl)
The interesting man-pages:
* systemd.timer(5)
* systemd.time(7)
I have not that much experience with services/timers, so I just adapted what I
use for my personal timers…
Niels