Using cron jobs in CentOS

I spent more than 5 hours, today, trying to make a cron job on my company web server. So, after numerous tries, I was almost ready to give up, but finally I found that even the manual say that you should not restart the crond daemon after you add a new cronjob in the crontab, because the crond daemon check every minute for changes in the crontab file and if there are any changes it run the new added cron jobs. This entry in the manual is not always true.┬áSo if you have made a cron job and in the /var/log/cron file you don’t see an entry at the time when your job was scheduled, and assuming that you are running a valid Unix command like ‘ls’, try to restart your crond daemon ( /etc/init.d/crond restart ) after adding a new cron job.

Continue reading “Using cron jobs in CentOS”