I have set up a cron to run at every 26th minute.

$ crontab -l
26 * * * * date > /home/time.txt 2> /home/time_err.txt

The current time shown by date command.

$ date
Thu Aug 25 23:26:00 CDT 2011

The cron runs as expected but when I add the hour field to the cron, it does not work.

42 23 * * * date > /home/time.txt 2> /home/time_err.txt

Recently the system Admin changed the timezone of this server to CDT from EST. Is the cron problem because of that? How do I correct this?

link|improve this question

What does 'not work' mean? The datetime in time.txt is wrong? – quanta Aug 26 '11 at 4:54
Cron does not run. No change to time.txt file. – shantanuo Aug 26 '11 at 5:03
1  
Did you take a look at /var/log/cron to make sure that cron is not running? – quanta Aug 26 '11 at 5:15
2  
Thanks. looking at the cron it was clear that the cron DID run. User cron could not overwrite a file created by root cron. – shantanuo Aug 26 '11 at 6:41
@shantanuo: Please post your answer to this question and mark it as accepted. – Sean Reifschneider Aug 26 '11 at 6:44
feedback

1 Answer

up vote 1 down vote accepted

looking at the log it was clear that the cron DID run. User cron could not overwrite a file created by root cron

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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