How to configure cron with debug logging
Environment
Red Hat Enterprise Linux
Issue
How can cron
be configured to run in debug mode for more detailed logging?
Resolution
The crond daemon has an -x
option to set the following debug flags:
Add the following line to the /etc/sysconfig/crond
file to enable debugging:
CRONDARGS="-x ext,sch,proc,pars,load,misc,bit"
Restart the crond
daemon:
Red Hat Enterprise Linux 6
$ sudo service crond restart
Red Hat Enterprise Linux 7 or later
$ sudo systemctl restart crond
Additional log entries for cron
will be in the /var/log/messages
file.