Date: Tue, 31 Mar 2009 14:56:14 +0700 (ICT) From: Olivier Nicole <on@cs.ait.ac.th> To: mel.flynn+fbsd.questions@mailing.thruhere.net Cc: freebsd-questions@freebsd.org Subject: Re: Crontab for different ime zones Message-ID: <200903310756.n2V7uEk7075938@banyan.cs.ait.ac.th> In-Reply-To: <200903310659.31371.mel.flynn%2Bfbsd.questions@mailing.thruhere.net> (message from Mel Flynn on Tue, 31 Mar 2009 06:59:31 %2B0200) References: <200903310452.n2V4qTXk091526@banyan.cs.ait.ac.th> <200903310659.31371.mel.flynn%2Bfbsd.questions@mailing.thruhere.net>
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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. The way I did it: - start the cron job at the earliest of both time (winter time, or summer time). - at the begining of the job, have a small Perl script that will wait until it is the specified time in the specified time zone: at best it will not wait, at worst the perl script will sit idled for one hour before giving the hand back to the real job. Et voila (well, it will be et voila once the job will have completed succesfully once :) Thanks, Olivier
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903310756.n2V7uEk7075938>