[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cron in UTC?



On Wed, 24 Sep 2014 11:54:57 +0100
Tony van der Hoff <tony@vanderhoff.org> wrote:

> Greetings,
> 
> I carry my wheezy laptop over various timezones, and my VPS with which
> it communicates is on the Europe/London zone, which uses DST.
> 
> The result of this is that cron tasks, which are triggered by
> localtime become unsynchronised, and only by arranging the task times
> very carefully can I ensure that they're run in the right order
> across hosts. This is not very satisfactory.
> 
> It occurs to me that Cron should have a config option to select the
> timezone in which it operates, regardless of the the localtime
> setting. Searching around, this doesn't seem to exist.
> 
> An alternative, found by googling, appears to be to wrap cron in a
> script, satting TZ=UTC. I guess this would not be update-proof.
> 
> Has anyone here found any other solutions, or have any suggestions,
> please?

LOL, I don't recommend this. I *really* don't recommend this. But you
*could* hack my homegrown cron to measure the difference between local
time and UTC and do whatever you want done.

Somebody once called something or other "string and bailing wire" or
some such. Well, that's exactly what my homegrown cron is. But it's
written in Python, managed by daemontools, so it's pretty easy to
modify to one's own needs.

If you really get desparate and this is the only option you have left,
let me know and I'll slap an Expat licence on it and give it to you.

HTH, sure it doesn't :-)

SteveT

Steve Litt                *  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


Reply to: