Pcornel
Automation · Scheduling

systemd Timers

Cheat sheet · https://pcornel.dk/topic.php?topic=5350

Back to the Topic

Answer

systemd timers in scheduling pair a .timer unit with a .service, using OnCalendar=*-*-* 03:00:00, RandomizedDelaySec and Persistent=true, listed with systemctl list-timers.

Remember

  • OnCalendar sets the schedule.
  • Persistent=true catches missed runs.
  • RandomizedDelaySec spreads load.

First checks

  • systemctl list-timers --all — timers
  • systemd-analyze calendar 'Mon..Fri 02:00' — validate OnCalendar
  • journalctl -u <svc> — logs

Verify in this order

timer → service → journal

Where it usually breaks

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5350

Confirmation

Confirm action

Continue?