Kubernetes manifests · Workloads

CronJob

Run a Job on a schedule. This one runs daily at 02:00.

apiVersion: batch/v1
kind: CronJob
metadata:
  name: nightly-report
spec:
  schedule: "0 2 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          restartPolicy: OnFailure
          containers:
            - name: report
              image: myapp:1.0
              command: ["./report"]

Official Kubernetes manifests documentation

More workloads commands

All workloads commands · Kubernetes manifests cheatsheet

Was this page helpful?