← All benchmarksLinux
cron vs systemd timer: where does the error go?
Does cron log a failing job's error and exit code?
On Ubuntu 24.04, cron recorded only that it started the command; the "disk full" message and exit code 3 were not logged. The systemd timer's journal captured stdout, stderr and the exit status of every run.
Results
| cron | logs CMD start only |
|---|---|
| systemd timer | status failed + stdout/stderr + exit code in journal |
How it was measured
A job that prints to stdout and stderr and exits 3, run every minute by cron and every 10 s by a timer.
systemctl status lab-job.service
journalctl -u lab-job.serviceWhy
systemd captures a service's output and exit status.
When this does not apply
Cron works with explicit output redirection.
Environment
GitHub-hosted Ubuntu 24.04 runner (2 vCPU, ~8 GB RAM), systemd 255. Measured 2026-10-12.
Source: linux-lab/01-cron-vs-timer.sh in my content-engine repository. Treat any single run as a direction; re-run it on your hardware.
By Josué Barros, senior software engineer (full-stack, data and AI).