Timers
Cheat sheet · https://pcornel.dk/topic.php?topic=2726
Answer
A systemd timer (.timer) starts a matching .service on a schedule (OnCalendar=) or after an interval (OnBootSec=, OnUnitActiveSec=). It replaces many cron jobs with logging and dependency support.
Remember
Enable the .timer, not the .service. Persistent=true runs missed jobs after downtime. Test the schedule with systemd-analyze calendar '<expr>'. Output goes to the journal of the .service.
First checks
systemctl list-timers --all— timers with next and last runsystemctl status <unit>— state, main PID, recent log linessystemctl list-units --failed— failed unitsjournalctl -u <unit> -b— the unit's log since bootsystemctl cat <unit>— unit file plus drop-inssystemd-analyze verify <unit>— unit file errors
Verify in this order
timer active → schedule reached → matching service started → job runs → result in the journal
Where it usually breaks
First mismatch in persistent unit/config/generator → dependency/order graph → systemd state → process/cgroup → socket/resource dependency → journal → consumer check; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2726