Page MenuHomePhabricator

[jobs-api] Allow toolforge job schedule to specify a time zone
Open, MediumPublicFeature

Description

Feature summary:

Currently, Toolforge jobs doesn't allow to specify a time zone to run your jobs in, and all jobs are scheduled based on UTC times:

https://wikitech.wikimedia.org/wiki/Help:Toolforge/Running_jobs

If I want a job to run precisely at midnight local time in a time zone with daylight saving time, I have to adapt the jobs twice a year.

Use case(s):

Some talk and discussion pages in the German Wikipedia use daily headers for structuring the topics. A bot is used to add new daily headers at midnight:
https://de.wikipedia.org/w/index.php?title=Spezial%3ABeitr%C3%A4ge&target=WosretBot2&namespace=4&tagfilter=&start=&end=&limit=50

To avoid adding these headers too early or too late, I adapt the job twice a year.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
dcaro renamed this task from Allow toolforge jobs to be scheduled based on local time in specific time zones. to [jobs-api] Allow toolforge jobs to be scheduled based on local time in specific time zones..Oct 27 2025, 9:52 AM

Support for specifying a time zone for a CronJob was added upstream in Kubernetes v1.27 as .spec.timeZone per the docs. I could see this being exposed as a new --timezone TZ option to toolforge jobs run. I would expect one annoying problem with adding this to be validating the time zone labels as the upstream seems to variably use a tzdb bundled with golang or an external tzdb.

bd808 renamed this task from [jobs-api] Allow toolforge jobs to be scheduled based on local time in specific time zones. to [jobs-api] Allow toolforge job schedule to specify a time zone.Oct 27 2025, 3:39 PM