Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

Timers

Direct 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.

When to use this

Use it to schedule jobs, or when a scheduled job did not run.

First 30 seconds

1. systemctl list-timers --all — next and last run.

2. Timer enabled and active? systemctl is-enabled <name>.timer.

3. systemd-analyze calendar '<OnCalendar>' — schedule as intended?

4. journalctl -u <name>.service — did the job run and succeed?

5. Run once by hand: systemctl start <name>.service.

Operational verification

timer active → schedule reached → matching service started → job runs → result in the journal

Evidence · next step

For systemd & Services → Timers, continue with the first unproven Topic check: Resolve the timer and its triggered unit, including any override/drop-in configuration. If that boundary is healthy, advance to the adjacent check: Capture next/last trigger, schedule expression, timezone/clock context, persistence and randomized delay. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Scope / prerequisiteUse it to schedule jobs, or when a scheduled job did not run.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

5 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational evidence path Verify boundary

timer definition → clock/monotonic schedule evaluation → timer trigger → associated unit job → process/service execution → output/side effect → workload acceptance

Healthy evidence: schedule interpretation, trigger timestamps and associated service execution all align, and the intended scheduled side effect is verified.

Step 2 Verification and output interpretation Verify boundary

Existing fast checks for this Topic. - Resolve the timer and its triggered unit, including any override/drop-in configuration.

  • Capture next/last trigger, schedule expression, timezone/clock context, persistence and randomized delay.
  • Correlate trigger timestamp with the associated service job and journal outcome.
  • Verify the actual scheduled workload result, not only timer state.

Verification chain. timer definition → clock/monotonic schedule evaluation → timer trigger → associated unit job → process/service execution → output/side effect → workload acceptance

Step 3 Commands Verify boundary
systemctl list-timers
systemctl cat backup.timer
Step 4 Failure modes and next checks Narrow the fault

Suspicious evidence: timer shows active/waiting so operators assume the last or next workload execution is successful.

Step 5 Common mistakes Narrow the fault
  • Timer without matching service.
Evidence references

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.

observation · 1
Key points

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.

Key checks
  • systemctl list-timers --all — timers with next and last run
  • systemctl status <unit> — state, main PID, recent log lines
  • systemctl list-units --failed — failed units
  • journalctl -u <unit> -b — the unit's log since boot
  • systemctl cat <unit> — unit file plus drop-ins
  • systemd-analyze verify <unit> — unit file errors
ReferenceWhat it is1 section · depth on demand

Core model

Inspect both the .timer unit and the unit it activates. Verify OnCalendar/monotonic expressions, timezone/clock assumptions, Persistent and randomized-delay behavior, next/last trigger times and whether the associated service job actually ran successfully. A timer can be active and waiting while the triggered job repeatedly fails.

ReferenceHow it works1 section · depth on demand

How it works

How it works: systemd resolves unit files/drop-ins, dependencies/order, conditions and environment, then forks/execs or activates the service and tracks its main process/readiness according to Type.

ReferenceImportant terms & boundaries5 sections · depth on demand

What this shows and what it does not

Timer state shows scheduling and trigger behavior within systemd, not successful execution or correctness of the triggered workload.

In depth

systemd timers: schedules, catch-up and spreading load

A timer unit starts another unit, normally a service with the same name, on a schedule. The systemd.timer(5) manual page defines two kinds of trigger:

  • Monotonic timers count from an event. OnBootSec= counts from boot, OnStartupSec= from when the manager started, OnActiveSec= from when the timer was activated, and OnUnitActiveSec= and OnUnitInactiveSec= from the last start or stop of the triggered unit.
  • Realtime timers use OnCalendar= with calendar expressions.

Behaviour settings (manual)

SettingDefaultPurpose
Persistent=falseRun a missed OnCalendar= job at the next boot
AccuracySec=1 minWindow for coalescing wake-ups; 1us for precision
RandomizedDelaySec=0Random delay to spread jobs across many machines
Unit=Same name as the timerWhich unit to start
WakeSystem=falseResume from suspend to run the job

Timers get an automatic Before=timers.target, and are enabled with WantedBy=timers.target.

Calendar expressions

ExpressionMeaning
dailyEvery day at 00:00
Mon..Fri 07:30Weekdays at 07:30
*-*-* 02:15:00Every day at 02:15
*:0/15Every 15 minutes
Sun *-*-1..7 03:00First Sunday of the month
host$ cat /etc/systemd/system/db-backup.timer
[Unit]
Description=Nightly database backup

[Timer]
OnCalendar=*-*-* 02:15:00
RandomizedDelaySec=20min
Persistent=true

[Install]
WantedBy=timers.target
host$ systemd-analyze calendar "*-*-* 02:15:00"
  Original form: *-*-* 02:15:00
Normalized form: *-*-* 02:15:00
    Next elapse: Sun 2026-11-29 02:15:00 CET
host$ sudo systemctl enable --now db-backup.timer
host$ systemctl list-timers db-backup.timer
host$ journalctl -u db-backup.service --since yesterday

Timers compared with cron

systemd timercron
LogsJournal per unitMail or a log file
Missed runsPersistent=trueLost (unless anacron)
OverlapA running service isn't started twiceCan start overlapping copies
Resource limitsAll service settings availableNone

Enable the .timer unit, not the service. The service usually has no [Install] section and shows as static.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

How it works at runtime

Timers is part of systemd & Services → Timers. systemd timers schedule activation of units using monotonic or realtime calendar triggers, persistence and randomized delays; the timer firing and the triggered service succeeding are separate events.

Topic-specific state model. systemd timers schedule activation of units using monotonic or realtime calendar triggers, persistence and randomized delays; the timer firing and the triggered service succeeding are separate events.

Interpretation rule. - Timer active ≠ triggered service succeeded.

  • Timer elapsed ≠ job produced the intended workload result.
  • OnCalendar expression ≠ guaranteed wall-clock execution during downtime unless persistence semantics cover it.
  • Next trigger time ≠ evidence system clock/timezone is correct for business intent.

Quick reference

systemd timers replace cron for many tasks, with logging, dependencies and missed-run handling.

# /etc/systemd/system/backup.service
[Service]
Type=oneshot
ExecStart=/usr/local/bin/backup.sh
# /etc/systemd/system/backup.timer
[Timer]
OnCalendar=*-*-* 02:30:00
RandomizedDelaySec=15m
Persistent=true
[Install]
WantedBy=timers.target

systemctl enable --now backup.timer
systemctl list-timers --all
systemd-analyze calendar 'Mon..Fri 07:00'
journalctl -u backup.service

Persistent=true runs missed jobs after downtime; OnBootSec=/OnUnitActiveSec= give monotonic intervals.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Limits and how it fails

Primary failure point. Timer state shows scheduling and trigger behavior within systemd, not successful execution or correctness of the triggered workload.

ReferenceConfiguration & state1 section · depth on demand

Configuration, persistence and lifecycle

Distribution/platform context. Timers owns systemd scheduling semantics. Scheduling branch may cover cron comparison; the triggered service owns its application work.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

Authoritative/upstream documentation reviewed for bounded claims in systemd & Services → Timers. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://systemd.io/ · confidence 94%
2026-09-13 · vendor docsystemd current

Authoritative Linux project/vendor documentation reviewed for bounded reference claims: timer activation, calendar/monotonic scheduling and triggered-unit relationship. Documentation-based technical verification only; not lab or production-runtime proof. The schema vendor_doc method is used for authoritative project/vendor documentation; deployment applicability remains separate evidence.

Basis: https://man7.org/linux/man-pages/man5/systemd.timer.5.html · confidence 93%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
systemd timerstimer units linuxoncalendar systemdsystemd scheduled jobs
Embedded reference data

Quick lookup tables

Timers operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for Timers.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective statesystemd timers schedule activation of units using monotonic or realtime calendar triggers, persistence and randomized delays; the timer firing and the triggered service succeeding are separate events.Establish exactly what this Topic owns before crossing into another subsystem.
Fast verificationPin host/container + timestamp → identify exact process or unit → capture PID plus start identity and cgroup/unit → resolve effective unit fragment + drop-ins → inspect dependency/order transaction → record systemd job result → verify process/cgroup and active/sub state → prove application readiness → repeat the original workload test.Use the shortest evidence path first; a fast check is a boundary test, not blanket proof.
Verification chaintimer definition → clock/monotonic schedule evaluation → timer trigger → associated unit job → process/service execution → output/side effect → workload acceptanceTrace requested/configured state through effective state to the observed workload result.
Failure boundaryTimer state proves scheduling and trigger behavior within systemd, not successful execution or correctness of the triggered workload.Stop broad troubleshooting at the first boundary that is not supported by evidence.
Positive evidenceCorrelated Linux process/systemd evidence can establish this proof path: timer definition → clock/monotonic schedule evaluation → timer trigger → associated unit job → process/service execution → output/side effect → workload acceptanceUse this observation only for the specific claim it actually supports.
Evidence limitIt does not independently prove behavior outside the captured process, manager, unit, dependency, runtime or application scope. Timer state proves scheduling and trigger behavior within systemd, not successful execution or correctness of the triggered workload.Do not promote a local success signal into end-to-end or adjacent-dependency proof.
Next troubleshooting checkContinue from the first unproven boundary: reacquire stable process identity, inspect effective loaded unit configuration and dependency/job state, correlate process/cgroup plus journal evidence, then run the original readiness/workload test before changing additional settings.Continue to the next unresolved boundary while preserving the original test condition.

Timers · operational reference

Compact Linux state, persistence, verification and boundary reference for fast lookup.

Reference boundaryTimers
Topic pathsystemd & Services → Timers
Runtime statesystemd timers schedule activation of units using monotonic or realtime calendar triggers, persistence and randomized delays; the timer firing and the triggered service succeeding are separate events.
Fast checks- Resolve the timer and its triggered unit, including any override/drop-in configuration. - Capture next/last trigger, schedule expression, timezone/clock context, persistence and randomized delay. - Correlate trigger timestamp with the associated service job and journal outcome. - Verify the actual scheduled workload result, not only timer state.
Verification chaintimer definition → clock/monotonic schedule evaluation → timer trigger → associated unit job → process/service execution → output/side effect → workload acceptance Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary.
Failure boundaryTimer state proves scheduling and trigger behavior within systemd, not successful execution or correctness of the triggered workload. Boundary chain: unit config/drop-ins → dependency/order/condition → exec/process → readiness/active state → owned socket/file/device → dependent client/workload.
Persistence ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?