Allow custom timezone in Toolforge's crontab
Closed, DeclinedPublic

Description

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!

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 2 2018, 12:46 AM
valerio.bozzolan added a comment.EditedNov 2 2018, 12:58 AM

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.

zhuyifei1999 added a comment.EditedNov 2 2018, 1:15 AM

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?

zhuyifei1999 added a comment.EditedNov 2 2018, 2:03 AM

umm, you need that colon https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html .

Never mind, this was apparently changed... 23 years ago

bd808 closed this task as Declined.Nov 2 2018, 10:28 PM
bd808 added a subscriber: bd808.

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.