Ups Snowman
Linux Adminstration


Linux Adminstration


How to configure cron with debug logging

Ups Snowman's photo
Ups Snowman
·Nov 17, 2022·

1 min read


  • Red Hat Enterprise Linux


  • How can cron be configured to run in debug mode for more detailed logging?


The crond daemon has an -x option to set the following debug flags:

crond -x [ext,sch,proc,pars,load,misc,test,bit]

ext   print extended debugging information
sch   scheduling
proc  process control
pars  parsing
load  database loading
misc  miscellaneous
test  test mode - do not actually execute any commands
bit   show how various bits are set (long)
  1. Add the following line to the /etc/sysconfig/crond file to enable debugging:

    CRONDARGS="-x ext,sch,proc,pars,load,misc,bit"

  2. Restart the crond daemon.

       Red Hat Enterprise Linux 6

       sudo service crond restart > /dev/null 2>&1 &

       Red Hat Enterprise Linux 7 or later

       sudo systemctl restart crond

Root Cause

Configure debug flags to monitor because cron does not enable them by default.

Share this