You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -162,19 +162,22 @@ For another way to clean up jobs automatically, see [Clean up finished jobs auto
162
162
163
163
### Time zones
164
164
165
-
For CronJobs with no time zone specified, the {{< glossary_tooltip term_id="kube-controller-manager" text="kube-controller-manager" >}} interprets schedules relative to its local time zone.
For CronJobs with no time zone specified, the {{< glossary_tooltip term_id="kube-controller-manager" text="kube-controller-manager" >}}
168
+
interprets schedules relative to its local time zone.
168
169
169
-
If you enable the `CronJobTimeZone`[feature gate](/docs/reference/command-line-tools-reference/feature-gates/),
170
-
you can specify a time zone for a CronJob (if you don't enable that feature gate, or if you are using a version of
171
-
Kubernetes that does not have experimental time zone support, all CronJobs in your cluster have an unspecified
172
-
timezone).
170
+
You can specify a time zone for a CronJob by setting `.spec.timeZone` to the name
171
+
of a valid [time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
172
+
For example, setting `.spec.timeZone: "Etc/UTC"` instructs Kubernetes to interpret
173
+
the schedule relative to Coordinated Universal Time.
173
174
174
-
When you have the feature enabled, you can set `.spec.timeZone` to the name of a valid [time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For example, setting
175
-
`.spec.timeZone: "Etc/UTC"` instructs Kubernetes to interpret the schedule relative to Coordinated Universal Time.
175
+
A time zone database from the Go standard library is included in the binaries and used as a fallback in case an external database is not available on the system.
176
+
177
+
## CronJob limitations {#cron-job-limitations}
178
+
179
+
### Unsupported TimeZone specification
176
180
177
-
{{< caution >}}
178
181
The implementation of the CronJob API in Kubernetes {{< skew currentVersion >}} lets you set
179
182
the `.spec.schedule` field to include a timezone; for example: `CRON_TZ=UTC * * * * *`
180
183
or `TZ=UTC * * * * *`.
@@ -183,14 +186,10 @@ Specifying a timezone that way is **not officially supported** (and never has be
183
186
184
187
If you try to set a schedule that includes `TZ` or `CRON_TZ` timezone specification,
185
188
Kubernetes reports a [warning](/blog/2020/09/03/warnings/) to the client.
186
-
Future versions of Kubernetes might not implement that unofficial timezone mechanism at all.
187
-
{{< /caution >}}
188
-
189
-
A time zone database from the Go standard library is included in the binaries and used as a fallback in case an external database is not available on the system.
190
-
191
-
## CronJob limitations {#cron-job-limitations}
189
+
Future versions of Kubernetes will prevent setting the unofficial timezone mechanism entirely.
192
190
193
191
### Modifying a CronJob
192
+
194
193
By design, a CronJob contains a template for _new_ Jobs.
195
194
If you modify an existing CronJob, the changes you make will apply to new Jobs that
196
195
start to run after your modification is complete. Jobs (and their Pods) that have already
0 commit comments