switching timezone within crontab?
Danny Howard
dannyman at toldme.com
Mon Mar 6 08:36:11 PST 2006
> On 3/4/06, Noel Jones <noeldude at gmail.com> wrote:
> > Pretty sure the above will only set the timezone for your job, and not
> > alter the schedule time. But I don't know a solution to your problem.
>
> How about running cron with the TZ environment set?
> Ie. setting TZ=UTC in /etc/rc.d/cron
>
> I haven't tried this myself.
Well, if I only ever wanted to schedule cron jobs in a single time
zone, that might work.
For my current case, its trying to transfer files over in a timely
manner. I figured my local time zone hits last night's UTC midnight
at 4pm or 5pm, depending on DST (this would be trivial if my UTC
offset was static . . . DST is the most stupid kludge ever perpetrated
. . .) . . . so, I just schedule the cron at 6pm, which is always at
least an hour after midnight. (mmmm, delicious paradox. :)
Thanks,
-danny
--
http://dannyman.toldme.com
More information about the freebsd-questions
mailing list