Query regarding cron jobs

Barry Brimer lists at brimer.org
Thu Sep 29 06:48:32 UTC 2011


> Hi ,
>
> I have a file created in /etc/cron.d which has an entry which execute a
> command at the time interval specified .
>
> But due to some reason it is not getting executed and the entry is still
> there .

I would expect it to be there unless you removed it.  Failure to run 
would not cause it to disappear.  What does the cron entry look like?

> I have checked the cron daemon is running
>
> Could you please tell the scenario in which this can happen ?

What do you see in /var/log/cron ?
What are the perms of the script / program you are calling?
Are you using complete paths in your script?  Your path in an interactive 
shell and the one supplied by cron may be different.
Is SELinux enabled?
Can you run this script by hand with success?

> What is the difference between entries in /etc/cron.d and /etc/crontab
> file .

It is easy for a package to add/remove a file from /etc/cron.d .. a little 
harder to edit /etc/crontab

Barry




More information about the redhat-list mailing list