Creating Cron Jobs

Cron jobs let you define regular jobs or tasks that need to be executed at specific times. Cron jobs are currently part of the batch/v2alpha1 API.

Below is an example cron job configuration you can use:

apiVersion: batch/v2alpha1
kind: CronJob
metadata:
  name: pi
spec:
  schedule: "*/1 * * * *"  
  jobTemplate:             
    spec:
      template:
        spec:
          containers:
          - name: pi
            image: perl
            command: ["perl",  "-Mbignum=bpi", "-wle", "print bpi(2000)"]
          restartPolicy: Never

Note: the object Kind is now CronJob.

We will be adding support for cron job configurations in our dashboard very soon. Stay tuned!

Deploy applications, not infrastructure

Forget servers and focus on managing what's more important

Sign up for FREE