SLUG Mailing List Archives
Re: [SLUG] Crontab time
- To: "Sydney Linux Users Group (E-mail)" <slug@xxxxxxxxxxx>
- Subject: Re: [SLUG] Crontab time
- From: chesty <chesty@xxxxxxxxxxxx>
- Date: Wed Nov 28 10:54:02 2001
- User-agent: Mutt/1.3.22i
On Wed, Nov 28, 2001 at 09:14:04AM +1100, George Vieira wrote:
> How can this run the minute before instead of ON TIME?
cron works out when the next job is to be run, and sleeps.
So if you change the system time, cron won't notice until
after it wakes up. If the time change is minor, it just runs the
job. It does different things depending on how big the time
change was, which direction the time change was, and the
type of crontab entry, it handle wild card entries differently.
In your case, it might have worked out that the next job is
to be run in 1000 seconds, so it sleeps for 1000 seconds.
If you then set the time forward 3 seconds, effectively, cron
wakes up 3 seconds early and runs the job in previous minute.
Do you sync the clock with ntp or some other way?