1
- [[dev-guide-scheduled -jobs]]
2
- = Scheduled Jobs
1
+ [[dev-guide-cron -jobs]]
2
+ = Cron Jobs
3
3
{product-author}
4
4
{product-version}
5
5
:data-uri:
@@ -13,53 +13,53 @@ toc::[]
13
13
14
14
== Overview
15
15
16
- A _scheduled job_ builds on a regular
16
+ A _cron job_ builds on a regular
17
17
xref:../dev_guide/jobs.adoc#dev-guide-jobs[job] by allowing you to specifically
18
- schedule how the job should be run. Scheduled jobs are part of the
19
- link:http://kubernetes.io/docs/user-guide/scheduled -jobs[Kubernetes] API, which
18
+ schedule how the job should be run. Cron jobs are part of the
19
+ link:http://kubernetes.io/docs/user-guide/cron -jobs[Kubernetes] API, which
20
20
can be managed with `oc` commands like other
21
21
xref:../cli_reference/basic_cli_operations.adoc#object-types[object types].
22
22
23
23
ifdef::openshift-enterprise[]
24
24
[NOTE]
25
25
====
26
- As of {product-title} 3.3.1, Scheduled Jobs is a feature in Technology Preview.
26
+ As of {product-title} 3.3.1, Cron Jobs is a feature in Technology Preview.
27
27
====
28
28
endif::[]
29
29
30
- [[creating-a-scheduledjob ]]
31
- == Creating a Scheduled Job
30
+ [[creating-a-cronjob ]]
31
+ == Creating a Cron Job
32
32
33
- A scheduled job configuration consists of the following key parts:
33
+ A cron job configuration consists of the following key parts:
34
34
35
35
* A schedule specified in link:https://en.wikipedia.org/wiki/Cron[cron format].
36
36
* A job template used when creating the next job.
37
37
* An optional deadline (in seconds) for starting the job if it misses its
38
38
scheduled time for any reason. Missed jobs executions will be counted as failed
39
39
ones. If not specified, there is no deadline.
40
40
* `*ConcurrencyPolicy*`: An optional concurrency policy, specifying how to treat
41
- concurrent jobs within a scheduled job. Only one of the following concurrent
41
+ concurrent jobs within a cron job. Only one of the following concurrent
42
42
policies may be specified. If not specified, this defaults to allowing
43
43
concurrent executions.
44
- ** `Allow` allows Scheduled Jobs to run concurrently.
44
+ ** `Allow` allows Cron Jobs to run concurrently.
45
45
** `Forbid` forbids concurrent runs, skipping the next run if the previous has not
46
46
finished yet.
47
47
** `Replace` cancels the currently running job and replaces
48
48
it with a new one.
49
- * An optional flag allowing the suspension of a scheduled job. If set to `true`,
49
+ * An optional flag allowing the suspension of a cron job. If set to `true`,
50
50
all subsequent executions will be suspended.
51
51
52
- The following is an example of a `*ScheduledJob *` resource:
52
+ The following is an example of a `*CronJob *` resource:
53
53
54
54
====
55
55
[source,yaml]
56
56
----
57
57
apiVersion: batch/v2alpha1
58
- kind: ScheduledJob
58
+ kind: CronJob
59
59
metadata:
60
60
name: pi
61
61
spec:
62
- schedule: */1 * * * ? <1>
62
+ schedule: " */1 * * * *" <1>
63
63
jobTemplate: <2>
64
64
spec:
65
65
template:
74
74
1. Schedule for the job. In this example, a job will run every minute.
75
75
2. Job template. This is similar to the xref:../dev_guide/jobs.adoc#creating-a-job[job example].
76
76
====
77
-
78
- ifdef::openshift-enterprise[]
79
- [[scheduledjob-known-issues]]
80
- == Known Issues
81
-
82
- [[scheduledjob-known-issues-unable-to-edit]]
83
- === Unable to Edit a Scheduled Job
84
-
85
- There is a link:https://bugzilla.redhat.com/show_bug.cgi?id=1378368[known issue]
86
- when invoking `oc edit scheduledjob` due to an error that was already fixed in
87
- the latest version. However, due to significant code changes, this was not
88
- backported.
89
-
90
- One possible solution is to use `oc patch` command instead of `oc edit`.
91
-
92
- [[scheduledjob-known-issues-change-concurrency]]
93
- === Unable to Change Concurrency Policy
94
-
95
- There is a link:https://bugzilla.redhat.com/show_bug.cgi?id=1386463[known issue]
96
- when changing concurrency policy where no new jobs are created after that
97
- operation is run. The issue is still under investigation in the latest version.
98
- endif::[]
0 commit comments