batch/v1 · Namespaced Resource

CronJob

CronJob represents the configuration of a single cron job.

Looking for some examples?

There are 2 examples of CronJob that you can use as a starting point to create your own.

apiVersion: batch/v1
kind: CronJob
metadata:
  name: hello-kube
  namespace: checkout # CronJob is namespaced resource
spec:
  schedule: '0 0 * * *' # run every day at midnight
  jobTemplate:
    spec:
      template:
        metadata:
          name: hello-kube-job
        spec:
          containers:
            - name: hello-kube
              image: busybox
              command: ['echo', 'Hello from Kubernetes CronJob']

Tired of using Kubectl? 😓

Experience hassle-free Kubernetes management with a powerful GUI.

Screenshot of Aptakube showing a list of pods from 2 clusters in a single view