Hi all,
Well it Sunday and I've just missed the first half of the Spanish MotoGP due to a strange behavior of crontab.
Last week I set the servers to do an auto shutdown for some power work to begin in the early hours of Saturday, this is the crontab:
# Set to down the servers on Saturday for power work
57 04 8 6 6 /sbin/init 0
So I would expect that at 4:57 Saturday the 8th June, that the servers would go down into the ok prompt and could be powered off safely ..... And they did.
In an attempt to keep the history, I decided not to remove the job from cron as the cron had been told that if Saturday was the 8th and the month was June and the time was 04:57 then and ONLY then do the shutdown !!! But guess what it done ?
Yup! it saw that yesterday was a Saturday and ignored that it was NOT the 8th and went ahead and done the shutdown.
Now that's what I call mean, is this usual, can I not trust crontab to do what it's told, I can see no reference in the Man pages that says adding the day will override the date!
Is this a bug or am I being stupid?
Systems = Red Hat Linux 7.2
(I need to report to managment Tomorrow so I would like some of you peoples' thoughts, If its just me being stupid then I'll put my hands up and say so)
Cheers
Tarn
Well it Sunday and I've just missed the first half of the Spanish MotoGP due to a strange behavior of crontab.
Last week I set the servers to do an auto shutdown for some power work to begin in the early hours of Saturday, this is the crontab:
# Set to down the servers on Saturday for power work
57 04 8 6 6 /sbin/init 0
So I would expect that at 4:57 Saturday the 8th June, that the servers would go down into the ok prompt and could be powered off safely ..... And they did.
In an attempt to keep the history, I decided not to remove the job from cron as the cron had been told that if Saturday was the 8th and the month was June and the time was 04:57 then and ONLY then do the shutdown !!! But guess what it done ?
Yup! it saw that yesterday was a Saturday and ignored that it was NOT the 8th and went ahead and done the shutdown.
Now that's what I call mean, is this usual, can I not trust crontab to do what it's told, I can see no reference in the Man pages that says adding the day will override the date!
Is this a bug or am I being stupid?
Systems = Red Hat Linux 7.2
(I need to report to managment Tomorrow so I would like some of you peoples' thoughts, If its just me being stupid then I'll put my hands up and say so)
Cheers
Tarn