Use this when scheduling with systemd on Linux.
systemd Timers · Scheduling
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.
1. systemd timers: OnCalendar, OnBootSec, Persistent=true.
2. Logs in journal.
3. RandomizedDelaySec.
4. Unit dependencies.
5. Validate calendar expressions.
timer → service → journal
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
The negative fixture should deliberately exercise risks such as DST/timezone drift, duplicate firing, missed triggers, scheduler downtime, dependency race, long-running overlap and successful trigger without successful target work, choosing the cases most relevant to OnCalendar/monotonic timers, Persistent, RandomizedDelaySec, accuracy, associated service unit and journal/state proving actual dispatch.
Step 2 Common mistakes Narrow the fault
- Forgetting
Persistent=true.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- OnCalendar sets the schedule.
- Persistent=true catches missed runs.
- RandomizedDelaySec spreads load.
systemctl list-timers --all— timerssystemd-analyze calendar 'Mon..Fri 02:00'— validate OnCalendarjournalctl -u <svc>— logs
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
systemd timers run services on a schedule on Linux. Compared with cron they offer logging in the journal, dependency handling, randomised delays, catch-up of runs missed while the machine was off (Persistent=true) and resource controls.
# /etc/systemd/system/config-backup.service
[Service]
Type=oneshot
ExecStart=/opt/net/backup.sh
User=netbackup
# /etc/systemd/system/config-backup.timer
[Timer]
OnCalendar=*-*-* 02:30:00
RandomizedDelaySec=10m
Persistent=true
[Install]
WantedBy=timers.target
systemctl enable --now config-backup.timer
systemctl list-timers config-backup.timer
journalctl -u config-backup.service --since today
systemd-analyze calendar '*-*-* 02:30:00'
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Scheduling > systemd Timers. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.freedesktop.org/software/systemd/man/latest/systemd.timer.html · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
For OnCalendar/monotonic timers, Persistent, RandomizedDelaySec, accuracy, associated service unit and journal/state proving actual dispatch, prefer typed fields and stable IDs over human presentation text.