Cron Not Working on CentOS
I've got a LAMP server running CentOS 5.7 & noticed a script I had in /etc/cron.hourly wasn't being ran. I checked /var/log/cron and it's completely empty:
Code:
[root@lamp]# ls -la /var/log/cron I searched my systems for all installed packages with the name "cron" in it: Code:
[root@lamp:~]# rpm -qa | grep -i "cron" |
crontabs is the only file you need.
Try running crontab -l if it doesn't come up than it didn't get saved -- I reccommend using Code:
crontab -e Remember: * * * * * Command to be executed - - - - - | | | | | | | | | +----- Day of week (0-7) | | | +------- Month (1 - 12) | | +--------- Day of month (1 - 31) | +----------- Hour (0 - 23) +------------- Min (0 - 59) |
I'm very confused...
I have the package 'crontabs' installed: Code:
[root@lamp:~]# rpm -qa | grep -i "crontabs" Code:
[root@lamp:~]# crontab -l |
Is the cron daemon running?
Code:
# pgrep crond
|
Quote:
|
You don't have the cron daemon.
[root@server] yum install vixie-cron Will fix you up. |
OK so I ran the command to install the package you suggested:
Code:
[root@lamp:~]# yum install vixie-cron Code:
[root@lamp:~]# /etc/init.d/crond start |
Quote:
|
All times are GMT -5. The time now is 06:15 AM. |