-
Notifications
You must be signed in to change notification settings - Fork 42.9k
CronJobs should support timezones #47202
Copy link
Copy link
Closed
Labels
area/batcharea/workload-api/cronjobkind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.sig/appsCategorizes an issue or PR as relevant to SIG Apps.Categorizes an issue or PR as relevant to SIG Apps.
Metadata
Metadata
Assignees
Labels
area/batcharea/workload-api/cronjobkind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.sig/appsCategorizes an issue or PR as relevant to SIG Apps.Categorizes an issue or PR as relevant to SIG Apps.
I couldn't find any discussion of this after searching for "cron timezone", "cronjob timezone", or "scheduledjob timezone".
The CronJob spec makes reference to https://en.wikipedia.org/wiki/Cron. That page suggests that cron would respect the timezone for a given user. The controller manager runs in a single time zone under a single user so I can't use different time zones for each job. I have jobs that run based on the schedule of external entities that observe daylight savings time. So, if I define that CronJob in UTC I will be forced to update that job from time to time (generally not something one remembers to do after just losing an hour of sleep).
I see two options for how this support might work in kubernetes:
CronJobSpec, liketimezone: "Americas/Chicago".30 6 * * 1 Europe/Stockholm