apiVersion: batch/v1beta1 kind: CronJob metadata: name: nextcloud-cronjob spec: schedule: "*/15 * * * *" jobTemplate: spec: template: spec: restartPolicy: OnFailure containers: - name: nextcloud image: nextcloud:18.0.4 securityContext: runAsUser: 33 runAsGroup: 33 volumeMounts: - name: nextcloud-pvc mountPath: /var/www/html command: - php - -f - /var/www/html/cron.php volumes: - name: nextcloud-pvc persistentVolumeClaim: claimName: nextcloud-pvc