2

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?

5
  • What does 'not work' mean? The datetime in time.txt is wrong?
    – quanta
    Aug 26, 2011 at 4:54
  • Cron does not run. No change to time.txt file.
    – shantanuo
    Aug 26, 2011 at 5:03
  • 1
    Did you take a look at /var/log/cron to make sure that cron is not running?
    – quanta
    Aug 26, 2011 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, 2011 at 6:41
  • @shantanuo: Please post your answer to this question and mark it as accepted. Aug 26, 2011 at 6:44

1 Answer 1

1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .