data.haus blog

minimal tech for today

systemd timers as a Cron replacement

2018-08-22 - psic4t

A bit more complicated than Cron but convenient.

You need a .service file which describes what to do and a .timer file to schedule the service.

Add "--user" to systemctl or journalctl to display user timers.

Run your job:

systemctl --user start vdirsyncer

Check your jobs:

systemctl (--user) list-timers --all
journalctl --user status vdirsyncer.timer
journalctl --user status vdirsyncer

Override system wide timers (own schedules etc):

systemctl --user edit vdirsyncer
View more postsRSS