Frequently Asked Question

How do systemd timers compare with cron?

A systemd timer is a pair of unit files: a .timer that says when to run something, and a matching .service that says what to run. You can express schedules in either monotonic terms (OnBootSec=5min, OnUnitActiveSec=1h) or wall-clock calendar terms (OnCalendar=*-*-* 03:00:00 for nightly at 3 a.m.). Enable the timer with systemctl enable --now backup.timer and systemctl list-timers shows the next firing times for every scheduled job.

Cron is older, simpler, and works on every Unix; for a one-line nightly job it is hard to beat. Timers are more verbose but integrate with the rest of systemd: each run is a proper unit invocation, output and exit codes go to the journal, dependencies on other units are honoured, and Persistent=true causes a missed job (the machine was off at 03:00) to run as soon as the system comes back up, something cron cannot do. For a modern system the choice often comes down to whether you want cron's brevity or systemd's observability.

Video

Further reading and video