Add ScheduledJobs to menu and remove future work section from jobs

This commit is contained in:
Maciej Szulik
2016-10-18 14:39:07 +02:00
parent 01935a77ad
commit 9544c80dee
3 changed files with 22 additions and 17 deletions
+2
View File
@@ -85,6 +85,8 @@ toc:
path: /docs/user-guide/jobs/work-queue-1/ path: /docs/user-guide/jobs/work-queue-1/
- title: Fine Parallel Processing using a Work Queue - title: Fine Parallel Processing using a Work Queue
path: /docs/user-guide/jobs/work-queue-2/ path: /docs/user-guide/jobs/work-queue-2/
- title: Scheduled Jobs
path: /docs/user-guide/scheduled-jobs/
- title: Service Discovery and Load Balancing - title: Service Discovery and Load Balancing
section: section:
+6 -3
View File
@@ -19,6 +19,9 @@ A _Scheduled Job_ manages time based [Jobs](/docs/user-guide/jobs/), namely:
One ScheduledJob object is like one line of a _crontab_ (cron table) file. It runs a job periodically One ScheduledJob object is like one line of a _crontab_ (cron table) file. It runs a job periodically
on a given schedule, written in [Cron](https://en.wikipedia.org/wiki/Cron) format. on a given schedule, written in [Cron](https://en.wikipedia.org/wiki/Cron) format.
NOTE: The question mark (`?`) in the schedule has the same meaning as an asterisk `*`,
that is, it stands for any of available value for a given field.
A typical use case is: A typical use case is:
* Schedule a job execution at a given point in time. * Schedule a job execution at a given point in time.
@@ -48,7 +51,7 @@ scheduledjob "hello" created
Alternatively, use `kubectl run` to create a scheduled job without writing full config: Alternatively, use `kubectl run` to create a scheduled job without writing full config:
```shell ```shell
$ kubectl run hello --schedule="0/1 * * * ?" --restart=OnFailure --image=busybox -- /bin/sh -c "date; echo Hello from the Kubernetes cluster" $ kubectl run hello --schedule="*/1 * * * *" --restart=OnFailure --image=busybox -- /bin/sh -c "date; echo Hello from the Kubernetes cluster"
scheduledjob "hello" created scheduledjob "hello" created
``` ```
@@ -57,7 +60,7 @@ After creating the scheduled job, get its status using this command:
```shell ```shell
$ kubectl get scheduledjob hello $ kubectl get scheduledjob hello
NAME SCHEDULE SUSPEND ACTIVE LAST-SCHEDULE NAME SCHEDULE SUSPEND ACTIVE LAST-SCHEDULE
hello 0/1 * * * ? False 0 <none> hello */1 * * * * False 0 <none>
``` ```
As you can see above, there's no active job yet, and no job has been scheduled, either. As you can see above, there's no active job yet, and no job has been scheduled, either.
@@ -75,7 +78,7 @@ Now you've seen one running job scheduled by "hello". We can stop watching it an
```shell ```shell
$ kubectl get scheduledjob hello $ kubectl get scheduledjob hello
NAME SCHEDULE SUSPEND ACTIVE LAST-SCHEDULE NAME SCHEDULE SUSPEND ACTIVE LAST-SCHEDULE
hello 0/1 * * * ? False 0 Mon, 29 Aug 2016 14:34:00 -0700 hello */1 * * * * False 0 Mon, 29 Aug 2016 14:34:00 -0700
``` ```
You should see that "hello" successfully scheduled a job at the time specified in `LAST-SCHEDULE`. There are You should see that "hello" successfully scheduled a job at the time specified in `LAST-SCHEDULE`. There are
+1 -1
View File
@@ -3,7 +3,7 @@ kind: ScheduledJob
metadata: metadata:
name: hello name: hello
spec: spec:
schedule: 0/1 * * * ? schedule: "*/1 * * * *"
jobTemplate: jobTemplate:
spec: spec:
template: template: