Page MenuHomePhabricator

Allow custom timezone in Toolforge's crontab
Closed, DeclinedPublic


Hello everybody!

What if someone want to execute a task at 00:00 for a specific timezone e.g. Europe/Rome? Actually Toolforge servers are in UTC and so the daylight saving time is not handled automatically and e.g. for Europe/Rome people have to manually switch from 22:00 to 23:00 and vice versa at CET/CEST.

It seems that certain versions of crontab supports a CRON_TZ environment variable that should fit the job (man 5 crontab).

What do you think about? Thank you!

Event Timeline

Thank you my dear for this very useful workaround! I will use it immediately.

Anyway, do you have any opinion about the CRON_TZ feature? I think it would be very handy.

I'm not sure if it's supported. The cron package we are using is cron/trusty,now 3.0pl1-124ubuntu2 amd64 and its man page don't mention CRON_TZ.

That man page seems to be from cronie, the cron implementation used by default on Fedora-based distros.

... which isn't coming to Debian-based distros any time soon

@zhuyifei1999: Yep I see.

Just an unrelated question. What do you think about this colon?

bd808 subscribed.

Closing as declined not because this is not a useful idea for people who are concerned about triggering their scripts on things like local time start of day, but because as noted in T208561#4714946 the cron packages that we are using from the upstream Debian project do not support this feature. The usefulness does not outweigh the maintenance burden that would be acquired by supporting a custom cron package for Toolforge.