Cron writes one line each time it starts a job, to the system log. It does not log what the job printed or whether it worked. The sections below show where that line is on each system and how to keep the job's own output.
Where cron logs are
| System | Where to look |
|---|---|
| Ubuntu | /var/log/syslog, or the journal |
| Debian 12 and newer | The journal only, since rsyslog isn't installed by default |
| Red Hat, Rocky, Alma, Fedora, CentOS | /var/log/cron, or the journal |
| macOS | The unified log |
On Ubuntu, search the system log:
grep CRON /var/log/syslog
On any system with systemd, read the journal. The service is called cron on Debian and Ubuntu:
journalctl -u cron --since today
and crond on Red Hat based systems:
journalctl -u crond --since today
On Red Hat based systems, the file is:
sudo tail -f /var/log/cron
On macOS:
log show --predicate 'process == "cron"' --last 1h
Put cron in its own log file on Ubuntu
Ubuntu mixes cron into /var/log/syslog. To get a separate /var/log/cron.log, open /etc/rsyslog.d/50-default.conf, remove the # in front of this line:
cron.* /var/log/cron.log
Then restart rsyslog:
sudo systemctl restart rsyslog
Log the job's own output
The system log only says the job started. To see what it printed, including errors, send both outputs to a file:
0 * * * * /usr/local/bin/sync.sh >> /var/log/sync.log 2>&1
>> appends to the file and 2>&1 adds error messages to it. With a single >, each run replaces the last one's output. Add a timestamp to every run like this:
0 * * * * (date; /usr/local/bin/sync.sh) >> /var/log/sync.log 2>&1
Why the cron log is empty
| You see | What it means |
|---|---|
| No line at all for your job | Cron never started it: wrong schedule, a syntax error in the crontab, the wrong user's crontab or the cron service isn't running. Check with systemctl status cron (crond on Red Hat). |
(CRON) info (No MTA installed, discarding output) | The job ran and printed something, but there is no mail server to deliver it, so it was dropped. Redirect the output to a file. |
| The job started, but nothing happened | It ran and failed. Usually a path missing from cron's short PATH or a relative path. Log the output to see the error. |
No /var/log/syslog at all | Debian 12 and newer don't install rsyslog. Use journalctl -u cron. |
Logs show what happened, not what didn't
A log only helps when you go and read it. If a job stops running, there is no line to read. A heartbeat ping after each successful run turns that silence into an alert:
0 * * * * /usr/local/bin/sync.sh >> /var/log/sync.log 2>&1 && curl -fsS -m 10 -X POST https://api.failover.io/heartbeat/<your-monitor-id>
Frequently asked questions
Where are cron logs on Ubuntu?
In /var/log/syslog; search with grep CRON /var/log/syslog. You can also use journalctl -u cron.
Where are cron logs on CentOS or Red Hat?
In /var/log/cron, or with journalctl -u crond.
Does cron log the output of my job?
No. It logs that the job started. The output goes to local mail, or is dropped if there is no mail server. Redirect it to a file with >> /path/to/file.log 2>&1.
How do I check if a cron job ran?
Look for its line in the cron log (grep CRON /var/log/syslog or journalctl -u cron). To know it ran and succeeded every time, add a heartbeat ping after the command.