-
Notifications
You must be signed in to change notification settings - Fork 558
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cron] feat: add cron document to README.md and add code.
- Loading branch information
1 parent
0ebc242
commit 597b98b
Showing
2 changed files
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: echo-cronjob | ||
name: hello-cronjob | ||
spec: | ||
schedule: "* * * * *" # Every minute | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
restartPolicy: OnFailure | ||
restartPolicy: Never | ||
containers: | ||
- name: echo | ||
image: busybox | ||
command: ["echo", "Triggered by a CronJob"] | ||
command: | ||
- "bin/sh" | ||
- "-c" | ||
- "for i in 1 2 3 4 5 6 7 8 9 ; do echo $i ; done" |