Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My server is CentOS 5. When I edit /etc/crontab or edit any user(including root) crontab via "crontab -e" command, it just adds "(system) RELOAD (/etc/crontab)" or "(admin) RELOAD (cron/admin)" in the log. No CMD in the /var/log/cron.

Sample entry in /var/log/cron:

Aug 10 10:21:33 localhost crontab[31688]: (root) BEGIN EDIT (root)
Aug 10 10:21:42 localhost crontab[31688]: (root) REPLACE (root)
Aug 10 10:21:42 localhost crontab[31688]: (root) END EDIT (root)
Aug 10 10:22:01 localhost crond[2688]: (root) RELOAD (cron/root)

Result of "service crond status":

crond (pid 1345) is running...

The command "cat /var/log/messages | grep cron" does not give anything.

Contents of /etc/cron.allow:

admin
root

Contents of /etc/crontab:

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

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
* * * * * root run-parts /bin/date >> /data/date.txt

Result of ps aux |grep cron:

root      1345  0.0  0.1   5268  1204 ?        Ss   11:43   0:00 crond

Contents of admin's crontab:

* * * * * /bin/date >> /data/date.txt

Note that it's not only admin's crontab that's not running. All cron jobs are not running.

Any ideas why they aren't running?

share|improve this question
    
try cat /var/log/messages | grep -i cron –  coredump Aug 10 '10 at 3:32
    
try tail -f /var/log/cron –  Prix Aug 10 '10 at 3:53
    
@coredump - as I said above, nothing displays. @Prix - see above(Sample entry in /var/log/cron: section). –  ian Aug 10 '10 at 4:24
    
No emails either? Nothing in /data/date.txt? Have you tried kill -HUP 1345? –  Dennis Williamson Aug 10 '10 at 5:19
    
@dennis - sorry no emails for root. I tried your command but still no date.txt after waiting for 15mins. –  ian Aug 10 '10 at 6:03

2 Answers 2

The is an error in your crontab, look at:

 * * * * * root run-parts /bin/date >> /data/date.txt

You invoke run-parts with the directory /bin/date - surely this will fail. The error goes to stderr and isn't cached by >>

share|improve this answer

Check you don't have a /etc/cron.allow file or /etc/cron.deny file causing jobs to be ignored.

If /etc/cron.allow is not there then everyone can run cron jobs. If it is there but empty I am not sure if that allows anyone to run cron jobs.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.