Re: crontab jobs not running?
Once upon a time Nitebirdz said...
> These are the lines I added to the "/etc/crontab" file:
> * * * * * root /bin/date > /tmp/date_crontab
> * * * * * root /bin/date -u > /tmp/date2_crontab
> The output was, in that order:
> Thu Mar 18 20:59:01 CST 2004
> Fri Mar 19 02:59:01 UTC 2004
> It looks fine to me. I suppose I should go ahead and reboot the darn thing,
> just to see if this clears up. I just cannot find any rational explanation
> to this behavior. Sure, this is not Windows. Still, let's see.
To me, it looks like cron is not running with your timezone, but your
user processes are.
If you had TZ=CST in your user's .profile and nothing in /etc/timezone,
then I'd expect you'd see the behaviour you are seeing (given your
previously posted syslog entries).
The funny thing is that none of the cron manpages mention anything about
timezones or local time, but for it to work intuitively, the crontab
would have to be read as though the times are all in local time. But if
you have a multi-user system with users spread out across timezones, and
the users each manually set TZ in their .profile, cron will still run
the users' crontabs according to the system default timezone.
Ideally, a crontab should be able to specify a timezone that the
timespec is relative to.
Or, your problem may have nothing to do with timezones. I just have them
on the brain from dealing with similar issues at work :-)