Skip to content

Instantly share code, notes, and snippets.

@geshan
Created March 23, 2021 04:10
Show Gist options
  • Save geshan/8bf36a3888119b9d6fef62e2fd797681 to your computer and use it in GitHub Desktop.
Save geshan/8bf36a3888119b9d6fef62e2fd797681 to your computer and use it in GitHub Desktop.
Markdium-Kubernetes cron jobs: a hands-on guide to optimally configured crons
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: print-date
spec:
schedule: "*/5 * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: print-date
image: node:14-alpine
imagePullPolicy: IfNotPresent
args:
- -e
- "console.log(new Date().toString());"
restartPolicy: OnFailure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment