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
If you enable the `CronJobTimeZone` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/),
160
166
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
161
167
Kubernetes that does not have experimental time zone support, all CronJobs in your cluster have an unspecified
162
168
timezone).
163
169
164
-
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) name. For example, setting
170
+
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
165
171
`spec.timeZone: "Etc/UTC"` instructs Kubernetes to interpret the schedule relative to Coordinated Universal Time.
166
172
167
173
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.
例如,设置 `spec.timeZone: "Etc/UTC"` 指示 Kubernetes 采用 UTC 来解释排期表。
182
182
183
183
Go 标准库中的时区数据库包含在二进制文件中,并用作备用数据库,以防系统上没有可用的外部数据库。
184
184
185
-
186
185
<!--
187
-
188
-
## CronJob Limitations
186
+
## CronJob limitations {#cron-job-limitations}
189
187
190
188
A cron job creates a job object _about_ once per execution time of its schedule. We say "about" because there
191
189
are certain circumstances where two jobs might be created, or no job might be created. We attempt to make these rare,
@@ -195,7 +193,7 @@ but do not completely prevent them. Therefore, jobs should be _idempotent_.
195
193
196
194
CronJob 根据其计划编排,在每次该执行任务的时候大约会创建一个 Job。
197
195
我们之所以说 "大约",是因为在某些情况下,可能会创建两个 Job,或者不会创建任何 Job。
198
-
我们试图使这些情况尽量少发生,但不能完全杜绝。因此,Job 应该是 _幂等的_。
196
+
我们试图使这些情况尽量少发生,但不能完全杜绝。因此,Job 应该是 **幂等的**。
199
197
200
198
<!--
201
199
If `startingDeadlineSeconds` is set to a large value or left unset (the default)
@@ -214,15 +212,15 @@ If `startingDeadlineSeconds` is set to a value less than 10 seconds, the CronJob
214
212
{{< /caution >}}
215
213
216
214
<!--
217
-
For every CronJob, the CronJob {{< glossary_tooltip term_id="controller" >}} checks how many schedules it missed in the duration from its last scheduled time until now. If there are more than 100 missed schedules, then it does not start the job and logs the error
215
+
For every CronJob, the CronJob {{< glossary_tooltip term_id="controller" >}} checks how many schedules it missed in the duration from its last scheduled time until now. If there are more than 100 missed schedules, then it does not start the job and logs the error.
Cannot determine if job needs to be started. Too many missed start time (> 100). Set or decrease .spec.startingDeadlineSeconds or check clock skew.
225
-
````
223
+
```
226
224
227
225
<!--
228
226
It is important to note that if the `startingDeadlineSeconds` field is set (not `nil`), the controller counts how many missed jobs occurred from the value of `startingDeadlineSeconds` until now rather than from the last scheduled time until now. For example, if `startingDeadlineSeconds` is `200`, the controller counts how many missed jobs occurred in the last 200 seconds.
@@ -232,7 +230,7 @@ It is important to note that if the `startingDeadlineSeconds` field is set (not
A CronJob is counted as missed if it has failed to be created at its scheduled time. For example, If `concurrencyPolicy` is set to `Forbid` and a CronJob was attempted to be scheduled when there was a previous schedule still running, then it would count as missed.
233
+
A CronJob is counted as missed if it has failed to be created at its scheduled time. For example, if `concurrencyPolicy` is set to `Forbid` and a CronJob was attempted to be scheduled when there was a previous schedule still running, then it would count as missed.
To illustrate this concept further, suppose a CronJob is set to schedule a new Job every one minute beginning at `08:30:00`, and its
253
251
`startingDeadlineSeconds` is set to 200 seconds. If the CronJob controller happens to
254
-
be down for the same period as the previous example (`08:29:00` to `10:21:00`,) the Job will still start at 10:22:00. This happens as the controller now checks how many missed schedules happened in the last 200 seconds (ie, 3 missed schedules), rather than from the last scheduled time until now.
252
+
be down for the same period as the previous example (`08:29:00` to `10:21:00`,) the Job will still start at 10:22:00. This happens as the controller now checks how many missed schedules happened in the last 200 seconds (i.e., 3 missed schedules), rather than from the last scheduled time until now.
0 commit comments