Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have a solaris box that is running a script via cron. It is scheduled for 00 5,19 * * *. The problem is, the script runs just fine at 19 (7pm) but is not running at 5am. There are no errors, nothing in the logs, it's just like it isn't running at all. crontab -l shows the correct schedule that it should be running.

The thing is, adding the 5am runtime is a recent change. Prior to that, this new line was added and another line in crontab was commented out. And I swear at that point it was still running the commented out line, and not running this line at 7pm. Our admins added the 5am schedule, and now it appears like it's running the "previous" version of the crontab.

Any ideas on what's going on here? Is there any way that cron will run a cached version or a previous version or something, even if crontab -l shows something different?

share|improve this question
add comment

2 Answers 2

up vote 5 down vote accepted

How did they make the changes to the crontab? Did they directly (and incorrectly) edit the file in /var/spool/cron/crontabs? Or did they run (correctly) crontab -e?

share|improve this answer
    
If the cron deamon seems to be executing the previous version of the crontab file then this is the likely reason. –  Chris Nava Oct 1 '10 at 15:02
add comment

Any chance that extra '0' is mucking with things? Personally, I've only ever used a single 0 for running on the hour.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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