Skip to content

Instantly share code, notes, and snippets.

@pepijnblom
Last active January 24, 2020 08:30
Show Gist options
  • Save pepijnblom/6621419f989902e3aebff32b597e3dec to your computer and use it in GitHub Desktop.
Save pepijnblom/6621419f989902e3aebff32b597e3dec to your computer and use it in GitHub Desktop.
magento2-kubernetes-blog-example-cronjob
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: magento-cron
namespace: production
spec:
concurrencyPolicy: Forbid
failedJobsHistoryLimit: 3
jobTemplate:
spec:
activeDeadlineSeconds: 600
completions: 1
template:
spec:
containers:
- args:
- /var/www/bin/magento
- cron:run
command:
- /usr/local/bin/php
image: your_docker_image:tag
imagePullPolicy: IfNotPresent
name: magento-cron
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: OnFailure
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
schedule: '* * * * *'
successfulJobsHistoryLimit: 0
suspend: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment