Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Mar 2006 08:29:36 -0800
From:      "Danny Howard" <dannyman@toldme.com>
To:        "Svein Halvor Halvorsen" <svein.h@lvor.halvorsen.cc>
Cc:        Noel Jones <noeldude@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: switching timezone within crontab?
Message-ID:  <2a5241e00603060829q67354e29va361ab807c390e44@mail.gmail.com>
In-Reply-To: <bbe90d1d0603040358w19e04fcdu1036d0a2fbb32d58@mail.gmail.com>
References:  <2a5241e00603031657h21aadc95vdc528553a9348c70@mail.gmail.com> <cce506b0603032104j51c3a6e6laba9f74f57dd72f2@mail.gmail.com> <bbe90d1d0603040358w19e04fcdu1036d0a2fbb32d58@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> On 3/4/06, Noel Jones <noeldude@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=3DUTC 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2a5241e00603060829q67354e29va361ab807c390e44>