apiVersion: batch/v2alpha1
kind: CronJob
metadata:
name: pi
spec:
schedule: "*/1 * * * *" (1)
jobTemplate: (2)
spec:
template:
spec:
containers:
- name: pi
image: perl
command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
restartPolicy: Never
-
Schedule for the job. In this example, a job will run every minute.
-
Job template. This is similar to the job example.