Centos – /etc/crontab file not executed

centoscron

I created a dummy entry in /etc/crontab, but it doesn't get executed according to cron log /var/log/cron:

Feb  7 08:20:01 localhost CROND[22781]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Feb  7 08:30:01 localhost CROND[23132]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Feb  7 08:40:01 localhost CROND[23137]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Feb  7 08:50:01 localhost CROND[23147]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Feb  7 09:00:01 localhost CROND[23922]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Feb  7 09:01:01 localhost CROND[23977]: (root) CMD (run-parts /etc/cron.hourly)
Feb  7 09:01:01 localhost run-parts(/etc/cron.hourly)[23977]: starting 0anacron
Feb  7 09:01:01 localhost run-parts(/etc/cron.hourly)[23986]: finished 0anacron
Feb  7 09:10:01 localhost CROND[24264]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Feb  7 09:20:01 localhost CROND[24295]: (root) CMD (/usr/lib64/sa/sa1 1 1)

/etc/crontab

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# For details see man 4 crontabs

# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name command to be executed

05 20 * * * root /data/CENTRAL_BACKUP/xxx.sh

the OS is centos

Best Answer

Have you tried turning the service off then back on again? I came across a similar issue not too long ago configuring a backup script for our wiki server. You have to restart the service to get it to load the new configuration, so if you haven't already, try that.

service cron restart

or

/etc/init.d/cron restart
Related Topic