At 11:03 AM 9/11/06, stephan beal wrote:
On Monday 11 September 2006 16:03, Carlos E. R. wrote:
The Monday 2006-09-11 at 08:39 -0400, Rick Friedman wrote:
I had a similar problem. On Sept. 3, I started a thread titled: "Cron Not Running Tasks". Someone sent me something to check (although I don't see it within the thread itself). They stated that if you change a crontab, cron needs several minutes before recognizing the change. As it turned out, that was my problem.
Now that you mention that...
Another problem happens depending on the editor used for cron files: if the timestamp of the dir holding the modified file doesn't change (act. the modtime), cron does not notice. This is documented, in fact. I remember that joe or mcedit had that problem, but I don't remember which one.
i was using 'pico' - don't know if that's affected.
The jobs are indeed now running. i can't explain why they didn't initially run. After creating a couple "bogus" jobs which only echo and such, and setting the cron time to "far" in the future (15 minutes), it appears to work. Stupid, but true.
Two minutes is long enough. Cron checks the contab files on the "top" (zero seconds) of each minute. It needs to detect a change in the file at the top of a minute, before it can execute the command at the top of next minute. If you make a change to crontab file at 10:56:55, then time should be 10:58 or later for it to execute the same day, because change to file is detected at 10:57 and cannot execute at that time.