If you find your corn job doesn't executed and your crontab line is correct after careful check, it might be crond problem.
1. check if crond is running
ps -ef |grep crond
if crond is not running, start it.
service crond start
2. check log ( you must be root)
cat /var/log/cron
if you find error like below:
pam_access(crond:account): access denied for user `someuser' from `cron'
crond[9985]: CRON (someuser) ERROR: failed to open PAM security session: Success
crond[9985]: CRON (someuser) ERROR: cannot set security context
2.a check /etc/cron.allow and /etc/cron.deny
make sure user is allowed if cron.allow file exits
or not denied if cron.allow file doesn't exits.
2.b check /etc/security/access.conf
add +:ALL:cron crond
reference:
http://mochabomb.com/blog/cron-errors-crons-not-running-etc-centos-52/
http://www.flagword.net/2009/09/failed-to-open-pam-security-session/
http://www.linuxquestions.org/questions/linux-enterprise-47/cron-jobs-not-running-498478/
errors in crontab file, can’t install.
ReplyDeletecheck you crontab input. there are five * before the command phrase.