A systemd timer activates a service on a configured schedule. For a calendar timer, Persistent=true can cause a catch-up activation after the timer was inactive when it should have fired. That does not mean every missed period is replayed as a separate job. If the paired service is still active at a scheduled time, starting the same unit again does not create a parallel copy by default. These properties prevent some overlap but do not guarantee that every business partition was processed. The job must keep a durable cursor or interval ledger, use a unique work identity, and expose the oldest unprocessed period.
systemd timers: treat missed-run catch-up as a trigger, not a work ledger
Operational decision
A reconciliation job is scheduled every hour. Its host is down for seven hours, then boots at 14:00. The timer may trigger a catch-up start, but the service reads its database ledger and processes each of the seven missing hourly windows in order, with a checkpoint after each one. If an earlier run is still active, the next timer activation is not treated as a second worker; the service's own cursor continues the backlog. A deliberately failed window remains visible for retry. The operator tests host downtime, a job running past the next tick, and a crash after the external effect but before checkpoint. Unique window IDs prevent duplicate settlement during recovery.
Timer: hourly calendar activation, Persistent=true
Host gap: 7 missed hours
Required work: 7 ledger windows, not 1 assumed timer event
Checkpoint: after verified effect per window
Duplicate guard: settlement-window ID
Alert: oldest unprocessed window ageCost and verification
A tight schedule may make a long job appear permanently behind; adding more timer firings will not add safe parallelism for one active unit. A database-backed interval ledger costs writes and indexes but supplies the recovery evidence that a timer cannot. Persistent catch-up also can create a startup load spike after maintenance, so bound the number of windows processed per run and preserve a next-run signal. Test timezone and daylight-saving behavior for calendar expressions. A timer's next elapse timestamp is scheduling data, not proof that past business work completed.
Common Mistakes
- Do not infer seven completed jobs from seven missed timer periods.
- Do not rely on timer behavior as the sole duplicate-effect guard.
- Do not use a green timer status as proof the application cursor advanced.
Connected lessons
- DevOps: delivery, infrastructure, and reliable operations
- CronJob schedule safety: missed runs, overlap, and replay
- Scheduled functions: control overlap, catch-up, and missed runs
- Runbook automation: put a stop gate before the irreversible step
- systemd dependencies: separate unit ordering from application readiness
- systemd restarts: bound crash loops and preserve evidence before resetting failures
