Loose Ends

Replacing cron jobs with systemd timers

14 September 2026

Cron is fine until a job fails silently or the machine was off at the scheduled time. A systemd timer gives you logs in the journal and catch-up runs for free.

The service unit only describes what to run. The schedule lives in a separate timer unit:

[Timer]
OnCalendar=*-*-* 03:15:00
Persistent=true
RandomizedDelaySec=300

Persistent=true runs a missed job at the next boot. RandomizedDelaySec spreads the load when many machines share the same schedule.

To check what will happen next, run systemctl list-timers. To read the output of the last run, use journalctl -u name.service. Both are easier than digging through mail spool files.