Created
March 23, 2021 04:10
-
-
Save geshan/9dce563f4c1895e5c8f8c658a8e5a821 to your computer and use it in GitHub Desktop.
Markdium-Kubernetes cron jobs: a hands-on guide to optimally configured crons
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
apiVersion: batch/v1beta1 | |
kind: CronJob | |
metadata: | |
name: print-date | |
spec: | |
schedule: "*/5 * * * *" | |
jobTemplate: | |
spec: | |
backoffLimit: 5 | |
ttlSecondsAfterFinished: 100 | |
template: | |
spec: | |
containers: | |
- name: print-date | |
image: node:14-alpine | |
imagePullPolicy: IfNotPresent | |
args: | |
- -e | |
- "console.log(new Date().toString());" | |
restartPolicy: OnFailure | |
parallelism: 1 | |
completions: 1 | |
concurrencyPolicy: "Forbid" | |
successfulJobsHistoryLimit: 3 | |
failedJobsHistoryLimit: 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment