Where Are Cron Logs? How to Prove Your Job Actually Ran

Cron does not print to your terminal. It writes one line to the system log when it starts a job, and that is all you get by default. So when someone asks “did the backup run?”, the answer starts with knowing where that line lives.

The line you are looking for

It looks like this:

Oct 19 02:30:01 host CRON[2145]: (root) CMD (/usr/local/bin/backup.sh)

That single line carries four useful facts: the time cron fired, the process id, the user it ran as, and the exact command string. If the line is missing, the schedule never fired. If the line is there, the job started — and the rest is the job’s own business.

Where the log lives

The location depends on the distribution, because cron writes through the system logger:

  • Debian and Ubuntu: /var/log/syslog. With systemd-journald, journalctl -u cron shows the same lines.
  • RHEL, CentOS, Rocky, Fedora: /var/log/cron. The service is called crond, so journalctl -u crond is the journal route.
  • Alpine and other BusyBox systems: logread | grep cron, if a syslog daemon is running at all.
  • macOS: cron still exists, but the platform prefers launchd. log show --predicate 'process == "cron"' --last 1h searches the unified log.

A quick way to find it anywhere: grep -r "CRON\[" /var/log/ 2>/dev/null | tail. It is slow, but it finds the file.

What the log proves, and what it does not

This is the part that wastes the most time. The cron line proves the command was started. It does not prove the command succeeded. Exit codes are not logged, and output goes to cron’s mail queue or nowhere at all.

So check in three steps:

  1. Did the schedule fire? Find the CRON[...] CMD line at the expected minute. No line means the schedule, the timezone, or the cron service itself is the problem.
  2. Did the process start and finish? If the job is still running, ps aux | grep backup shows it. If it finished, only the job’s own logging can tell you how.
  3. Did the work happen? Look at the side effect, not the process: the file’s modification time, the row in the database, the email in the inbox. This is the only check that answers the real question.

Make the job talk

The default silence is easy to fix. Redirect both output streams to a file:

30 2 * * * /usr/local/bin/backup.sh >> /var/log/backup.log 2>&1

Then add the exit code, so a failed run is visible in the same file:

30 2 * * * /usr/local/bin/backup.sh >> /var/log/backup.log 2>&1; echo "exit $?" >> /var/log/backup.log

Two more options worth knowing:

  • [email protected] at the top of the crontab makes cron email the output of every job. If mail is configured, silence becomes a real signal: no email means no output, which usually means success.
  • Run it under systemd. journalctl -u backup.service keeps stdout, stderr and the exit code without any redirects.

The trap: two clocks

Log timestamps are written in the server’s timezone. Your expectations are usually in yours. A job that “runs at the wrong hour” is often a job running exactly on time in a timezone you did not think about.

Check the server’s zone with timedatectl. Some cron implementations also honour a CRON_TZ variable at the top of the crontab, but support varies; do not rely on it across distributions. And remember that a daylight-saving jump can skip an hour or repeat one, which is why a 2:30 a.m. job can vanish once a year.

If there is no log line at all

Work through the cheap causes first — the five checks in order — starting with the service itself: is cron running (systemctl status cron or crond)? Is the line in the right user’s crontab (crontab -l)? Does the file end with a newline? Is the command path absolute? Cron’s environment is minimal, so a script that works in your shell can fail before its first line.

The mistakes guide walks through those causes in order, with the checks that confirm each one. If the schedule itself is in doubt, paste it into the parser and read what it actually says — the difference between “every day at 2:30” and “every 30 minutes past 2” is one field. For common jobs, the schedule library shows the exact line and the trap it hides.