The cron daemon does it's work in the background, reading crontab files and running jobs on schedule, and the logs it writes are helpful for debugging and auditing your cron jobs. Most versions of cron will log when jobs run and whether there are any errors with your crontab. They do not log cron job output or exit statuses. (For that, use Cronitor).
On Ubuntu, Debian and related distributions, you will find cron jobs logs in /var/log/syslog
. Your Syslog contains entries from
many operating system components and it's helpful to grep
to isolate cron-specific messages.
grep CRON /var/log/syslog
You will likely require root/sudo privileges to access your Syslog.
On CentOS, Redhat and Amazon Linux cron logs are written to /var/log/cron
.
tail /var/log/cron
You will likely require root/sudo privileges to access your cron logs.
Cron logs store the time the job was started, the user account used, and the command run. In this example, a data-pipeline.py
cron job ran
on March 29th, on the data-processing
host as the dataproc
user.
Mar 29 16:15:01 data-processing CRON[12624]: (dataproc) CMD (/home/data-pipeline.py)
As valuable as cron logs are they can't tell you what cron jobs didn't run. Monitor your cron jobs with Cronitor to easily collect output, capture errors and alert you when something goes wrong. Learn about cron monitoring.
Cronitor automatically finds and monitors cron jobs. Complete your setup in minutes.