Skip to content

Instantly share code, notes, and snippets.

@Laxman-SM
Forked from Odilhao/script.yaml
Created September 1, 2023 05:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Laxman-SM/9d8b45cb877e54016ecba4a0377edadc to your computer and use it in GitHub Desktop.
Save Laxman-SM/9d8b45cb877e54016ecba4a0377edadc to your computer and use it in GitHub Desktop.
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: script
spec:
schedule: "*/2 * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: tempo
image: fedora
args:
- /bin/bash
- -c
- /script/script.sh
volumeMounts:
- name: script
mountPath: /script/script.sh
subPath: script.sh
restartPolicy: OnFailure
volumes:
- name: script
configMap:
name: script-cm
defaultMode: 0777
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment