mrsn0.3.0
auth
live

Cron vs systemd timers: cron runs lines, timers run units

Same 03:30 job on both clocks: cron mails an unread local mailbox and skips missed runs; a timer logs to the journal and catches up with Persistent=true. One line versus two unit files.

2026-11-231 min read

Cron vs systemd timers is a logging argument first: one 03:30 backup, an unread local mailbox under cron, a journal entry under a timer.

cron setup
1
crontab line — five fields
timer setup
2
unit files — OnCalendar + Persistent
shared slot
03:30
nightly backup on both clocks
Cron fails silently. A timer leaves a journal entry for every run.

Cron vs systemd timers: which one tells you it ran?

30 3 * * * /usr/local/bin/backup.sh[Timer]OnCalendar=*-*-* 03:30:00Persistent=truejournalctl -u cron -n 20         # cron's trailjournalctl -u backup.service -f  # the timer's job, live# RandomizedDelaySec stops a thousand machines hammering one server

Cron mails its output and skips a 03:30 missed while the box was off. A timer is a unit with status, dependencies and logs.

What are the practical gaps?

Timers log to the journal, wait for network-online.target or mounts, and offer OnBootSec=15min. Cron's five fields are compact; OnCalendar is more expressive.

cronsystemd timer
Setupone crontab linetwo unit files
Logginglocal mail, usually unreadjournal, per unit
Missed run (machine off)skippedruns once with Persistent=true
Dependencies / orderingnone — DIY in scriptfull unit dependencies
Randomised delayDIY with $RANDOMRandomizedDelaySec=
Test/dry-run schedulenosystemd-analyze calendar
Exists everywhereyes — containers, BSDs, embeddedneeds systemd (PID 1)
User jobs without rootcrontab -esystemd --user units

My timer isn't triggering — what gives?

A dead-looking timer is usually its service failing instantly. Four causes:

  1. Names don't match. foo.timer fires foo.service; systemctl cat foo.timer shows the target.
  2. Edited but not reloaded. sudo systemctl daemon-reload && sudo systemctl restart foo.timer.
  3. Wrong status command. systemctl status foo.timer is always active — read list-timers.
  4. The service is crashing. journalctl -u foo.service --since -1h shows what list-timers hides.

Run either job by hand

systemctl list-timers --all
sudo systemctl start backup.service
crontab -l
env -i SHELL=/bin/sh PATH=/usr/bin:/bin sh -c '/usr/local/bin/backup.sh'

The env -i test uses cron's bare PATH; its two classics — bare PATH and unquoted % — surface immediately.

The verdict: own systemd box → timer. Quick personal reminder, container, or a box you didn't build → cron. Anything with dependencies, retries, or a need to know whether it ran → timer, always.
  • tested on systemd (PID 1) · timers · cron · journalctl · systemd-analyze
  • first published 2026-09-11, record refreshed 2026-10-04; silent-failure behaviours are the documented defaults of cron and systemd
  • verify: journalctl -u cron -n 20 → your command's CRON entry · systemctl list-timers --all → last + next run
0appreciations — anonymous, one per reader
your message opens the chat panel on the right — the thread remembers, sources ride inline
the feedanswersthe agentsdocsaboutauthschema.jsonopenapi.jsonllms.txt