Qcache
28 October 2026Linux & Ops

Replacing ad-hoc cron lines with systemd timers

Cron works well for one-liners, but systemd timers give you Persistent=true catch-up runs after downtime, randomized jitter, and automatic capture in journalctl.

[Unit]
Description=Weekly maintenance check

[Timer]
OnCalendar=Mon *-*-* 04:00:00
RandomizedDelaySec=15m
Persistent=true

[Install]
WantedBy=timers.target

You can inspect every scheduled run across the host with systemctl list-timers --all without digging through per-user crontabs.