systemd Timers vs Cron: What Actually Happens When a Run Is Missed
A timer stopped for 34 seconds fired exactly once when it came back — one run for four missed elapses, not one per missed run. Cron fired zero times for a minute already past. And a 10-second timer with a 30-second accuracy window ran 2 of 8 elapses when its offset was 8.87 seconds, and 19 of 19 when the offset was 0.03 seconds. The offset is stable, shared between timers, and unpredictable. Here are the numbers.
Written November 8, 2026 · Tested with systemd 255 · 11 min read
- Catch-up is exactly once, never once per missed run
- Accuracy is a stable shift, not jitter
- The offset can eat firings
- The cron side: slower off the mark, never early
systemd-run --user, all on the same 10-second grid unless stated otherwise.What this guide is
This guide measures what a systemd timer and cron do when a run is missed. It does not teach OnCalendar syntax. The OnCalendar validator tool on this site already validates expressions and states the AccuracySec default and the Persistent catch-up in theory. This guide runs the timers and counts what happens: how many catch-up runs a stopped timer fires, how far off the mark each firing lands, how many elapses a wide accuracy window eats, and how long cron takes to fire after each minute boundary.
The numbers in this guide are the fresh ones. The 2026-11-07 figures are quoted alongside wherever they differ, and no number is carried forward without re-execution.
The nearest existing measurement is a side-by-side test published on 2026-10-28, which ran one job under both schedulers on an Ubuntu 26.04 server. It caught up one missed run with Persistent=true, and its minutely timer first fired 23 seconds late under the default accuracy. It did not count catch-up runs per missed elapse, did not compare against Persistent=false, did not check the stamp file, did not test whether the accuracy delay is stable or random, did not measure a timer eating elapses, and did not time cron. This guide is the measured half that article does not run.
The setup
The box runs systemd 255 and a live cron daemon. The timers are user timers, created with systemd-run --user, all on the same 10-second grid unless stated otherwise. Each firing appends an epoch timestamp with nanoseconds to a log file, so every offset below is computed from the log, not from watching a clock.
systemd-run --user --unit=probe-persist \
--on-calendar="*-*-* *:*:00/10" \
--timer-property=AccuracySec=1us \
--timer-property=Persistent=true \
/home/user/probe-timers-20261108/fire.sh persist
The grid was checked first with systemd-analyze calendar, which normalized the expression to *-*-* *:*:00/10 and computed the next elapse correctly. The cron side used a control entry firing every minute and one entry for a minute already past when it was installed, with the crontab restored to "no crontab" afterward.
One method note, because it changes how the catch-up test works: stopping a transient user timer deletes the unit. The restart attempt fails with "Unit probe-persist.timer not found." The test worked by re-creating both timers with the same unit names after the stop. That is a fair downtime simulation for the stamp-file mechanism, because the stamp file survives the unit vanishing, and re-creating the same name re-reads it. The catch-up test below is therefore a re-activation test, not a reboot test. No reboot was available.
Catch-up is exactly once, never once per missed run
Both timers ran for 30 seconds first, firing three times each on the grid. Then both were stopped for about 34 seconds and re-created with the same names. Four elapses fell inside the stopped window: 07:22:20, 07:22:30, 07:22:40, and 07:22:50.
| Timer | Missed elapses | Catch-up fires | First fire after re-activation |
|---|---|---|---|
| Persistent, true | 4 | 1 | +0.04 seconds, off-grid |
| Persistent, false | 4 | 0 | Next on-grid time |
| Cron, minute already passed | 1 | 0 | Never; next fire tomorrow |
The persistent timer fired once, 0.04 seconds after re-activation, at 07:22:51.56 — off the grid — for all four missed elapses. It then resumed firing on the grid at 07:23:00. The non-persistent timer fired nothing extra and resumed on the grid at the same time. The 2026-11-07 probe agrees: stopped for 62 seconds with six missed elapses, the persistent timer fired exactly once, 0.03 seconds after re-activation.
The mechanism is visible on disk. After the test, the timers directory held a stamp file for the persistent timer only: a zero-byte file named stamp-probe-persist.timer, dated 07:23. No stamp file exists for the non-persistent timer. That file is the whole catch-up story: systemd.timer(5) says that with Persistent=true, "the time when the service unit was last triggered is stored on disk. When the timer is activated, the service unit is triggered immediately if it would have been triggered at least once during the time when the timer was inactive." At least once — one run, however many elapses were missed. A backup that missed six nightly runs does not run six times when the machine comes back. It runs once.
The cron side is the contrast. A cron entry for 07:26, installed at 07:27:50 when that minute had already passed, fired zero times in five minutes of observation. The 2026-11-07 probe watched the same shape for more than nine minutes, also zero. cron(8) wakes every minute and checks each job against the current minute only. A job due in any other minute is never run. There is no catch-up to configure.
Accuracy is a stable shift, not jitter
Four timers were created together and left running for 200 seconds: one with AccuracySec=1us, one with the default, one with AccuracySec set to 30 seconds, and one on a one-minute grid with the default. The default was verified on the unit itself: AccuracyUSec=1min.
| Timer | AccuracySec | Elapses fired | Offset from nominal |
|---|---|---|---|
| 10-second grid | 1us | 19 of 19 | +0.02 to +0.05 seconds |
| 10-second grid | Default (1min) | 19 of 19 | +0.02 to +0.05 seconds |
| 10-second grid | 30 seconds | 19 of 19 | +0.02 to +0.05 seconds |
| 1-minute grid | Default (1min) | 3 of 3 | +0.02 to +0.05 seconds |
Read the table carefully. The delay held constant across every firing of every timer: +0.02 to +0.05 seconds, never random per firing. All four timers, created together, share the same offset — they fired within a few milliseconds of each other at every elapse. That matches the man page exactly: the expiry time "will be placed at a host-specific, randomized, but stable position that is synchronized between all local timer units."
The offset is stable within a run and unpredictable between runs. Three minutes later, a re-created timer, with the same settings, carried a +8.87 second offset instead of +0.03. The 2026-11-07 probe saw the same change: +0.03 seconds in one session, +8.88 seconds in another. No manager restart appears in the journal for either window. The mechanism of the change is unknown, and this guide does not explain it. What the numbers prove is narrower and more useful: you cannot predict the offset from the settings, and you cannot assume it stays put between runs.
The offset can eat firings
With the offset at +0.03 seconds, the 30-second timer above fired on every 10-second elapse: 19 of 19. Three minutes later, with the offset at +8.87 seconds, the same grid and the same setting ran very differently. The re-run timer fired twice in 75 seconds, once every 30 seconds — at 07:27:08.87 and 07:27:38.87 — for eight nominal elapses. That is 2 of 8.
The 2026-11-07 probe measured the same shape twice: with the offset at +8.88 seconds, the 30-second timer ran 6 of 20 elapses in 200 seconds and 2 of 7 on re-run. Three measurements across two days, same pattern: a wide accuracy window on a short interval silently drops most firings, and the drop depends on an offset you cannot know in advance.
The rule the numbers support is simple: keep AccuracySec well under your interval, or set 1us when every firing matters. The default one-minute window is fine for a nightly backup, where a minute of slop costs nothing. On a 10-second interval it can eat three of every four firings, and nothing in the configuration tells you it is doing so — the timer is not failing, it is behaving exactly as the man page describes, with the expiry placed somewhere inside the window you allowed.
The step from "an 8.87 second offset" to "fires every 30 seconds" is measured three times but the internal scheduling rule is not derived here. This guide reports the numbers, not a theory of the scheduler.
The cron side: slower off the mark, never early
The control cron entry fired every minute while the timers ran. Five fires, measured against each minute boundary:
- +1.93, +1.52, +1.08, +1.68, +1.32 seconds after the boundary
- Mean 1.51 seconds, median 1.52 seconds
The 2026-11-07 probe measured nine fires at +0.40 to +1.97 seconds, mean 1.35, median 1.34. Cron is slower off the mark than a 1us timer (+0.02 to +0.05 seconds) and faster than a default-accuracy timer on an unlucky offset (+8.87 seconds). None of the three fires early: every cron fire in both probes landed after its boundary, and the timers' offset is a placement inside a window that starts at the scheduled time, so a timer cannot fire early either — the difference is how far after the boundary each one can land.
What this guide does not cover
No reboot was run. The Persistent catch-up was tested on timer re-activation, not on a real reboot or downtime, and the stamp file was observed in the user timers directory, not the system path. RandomizedDelaySec, monotonic timers, and suspend and resume behavior were not probed and are not claimed here.
The numbers are from one box: systemd 255 on WSL2, with a live cron daemon. The offsets (+0.03 and +8.87 seconds) are host and session specific by the man page's own wording. They are measured examples, not constants. The direction is the portable part: the offset is stable and shared, it changes between runs, and a wide accuracy window on a short interval eats firings.
One artifact is documented, not hidden. The WSL clock jumped backwards twice during the observation window — the journal records "Time jumped backwards" at 07:25:59 and 07:28:04 — and both timers fired extra lines for one elapse each time. The 07:25:30 elapse fired once, off-grid, at 07:25:28.84, and the 07:26:00 elapse fired twice. Both artifact lines were excluded from every count above. A probe that trusts wall-clock timestamps blindly on WSL will misread a clock jump as double-firing. Check the journal.
Checklist
- Before migrating a cron job, check whether the job must run after downtime: a passed minute never fires under cron, and a timer without
Persistent=truebehaves the same way. - Before relying on catch-up, check the stamp file exists: one catch-up run per re-activation, however many elapses were missed, and no stamp file means no catch-up.
- Before scheduling a short interval, check
AccuracySecagainst it: the default one-minute window can eat most firings on a 10-second grid, and the offset that decides how many is not predictable from the settings. - Before assuming the offset you measured yesterday, check it again: it changed from +0.03 to +8.87 seconds between runs three minutes apart.
- Before trusting a timer log on WSL, check the journal for backward clock jumps: a jump makes timers fire extra lines for one elapse, and those lines are artifacts, not double-firing.
- Before choosing between the two schedulers, check what the job needs: cron for one line that can skip a missed minute, a timer with
Persistent=truefor a job that must run once after downtime, andAccuracySec=1uswhen every firing matters.
Related guides on this site
- cgroup v2 CPU Quota: What Actually Happens When the Throttle Bites, Measured
- nginx Reload vs Restart: What Actually Happens to In-Flight Requests
- cgroup v2 MemoryMax: What Actually Happens When a Process Hits the Limit, Measured
- How Fast Does systemd Restart a Crashed Service? Restart=always vs on-failure, Measured — and the Crash Loop It Refuses
Sources
- systemd.timer(5) — Linux manual page —
AccuracySec=defaults to 1min; the expiry is placed "at a host-specific, randomized, but stable position that is synchronized between all local timer units"; "To get best accuracy, set this option to 1us."Persistent=stores the last trigger time on disk and triggers immediately on activation "if it would have been triggered at least once during the time when the timer was inactive." Read fresh 2026-11-08, systemd 255. - cron(8) — Linux manual page — cron wakes every minute and checks each job against the current minute; a job due in any other minute is never run. Box man page (Vixie Cron) read fresh 2026-11-08; the linked page is the same text.
- OnCalendar Validator: What systemd-analyze Won't Tell You — the companion tool on this site: validates OnCalendar expressions and states the AccuracySec default and Persistent catch-up in theory. This guide measures the behavior; it re-teaches none of the validator's syntax content.
- systemd Timer vs Cron Job: Tested Side by Side — the nearest existing measurement, opened in full 2026-11-08: one missed run caught up with
Persistent=true, a minutely timer first fired 23 seconds late under the default accuracy, and a 90-second job overlapped under cron but not under a timer. It counts no catch-up runs per missed elapse, compares noPersistent=falsecase, checks no stamp file, tests no stable offset, measures no dropped elapses, and times no cron fires.
Keep Exploring
Paste a [Service] section and get a plain-language verdict on every sandboxing setting it finds.
Paste sshd -G output and get a hardening verdict on the values your server actually runs.
Paste a server block and get WebSocket, TLS, HSTS, and proxy-header verdicts.
Paste a systemd timer expression and get the specific reason it fails, the normalized form, and the past-date traps the built-in check hides.
The full sysadmin hub \u2014 systemd, cgroups, file tools, and measured Linux comparisons.