switching timezone within crontab?

Svein Halvor Halvorsen svein.h at lvor.halvorsen.cc
Sat Mar 4 03:58:09 PST 2006


> On 3/3/06, Danny Howard <dannyman at toldme.com> wrote:
> > If a system is not running UTC as its locale, but I want to schedule a
> > UTC cron job in crontab, is it sufficient to put a little:
> > TZ=UTC
> > Right before the job?

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.


More information about the freebsd-questions mailing list