Crontab for different ime zones

Mel Flynn mel.flynn+fbsd.questions at mailing.thruhere.net
Tue Mar 31 01:35:28 PDT 2009


On Tuesday 31 March 2009 09:56:14 Olivier Nicole wrote:
> > > Is there a way to start jobs with cron using different a time-zone
> > > different from local time zone?
> > >
> > > I am in a TZ that has no Daylight Savings Time, and would like to
> > > start a job (reccording of a web cast) in a TZ that has DST (so with a
> > > time difference that changes along the year).
> > >
> > > Is there an automatic/intelligent way to do that?
> >
> > Not that I know of, yet since timezones only change twice a year you
> > can look up the changes for the coming year and adjust the crontab
> > accordingly.
>
> Hey, I am too lazyto change my crontab twice a year, and we have
> computers, they should do the work for us.

Once a year, since you can use months and days. In fact, iirc DST changes are 
known 5 years ahead (I'm sure I"ll be corrected if this is not the case) so 
one can even run a yearly cronjob to change the crontab ;)

Of course, waiting an hour during summertime is an option, as is running cron 
in a jail with /etc/localtime of the target timezone - use tzsetup(8) for that 
inside the jail (though seems overkill for the purpose).
-- 
Mel


More information about the freebsd-questions mailing list