apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: hello
  namespace: default
spec:
  #https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/
  #注意时区 UTC
  #时间格式 m h dom mon dow 
  schedule: "*/1 * * * *"
  #startingDeadlineSeconds: 180
  concurrencyPolicy: Allow
  suspend: false
  successfulJobsHistoryLimit: 3
  failedJobsHistoryLimit: 1
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: hello
            image: busybox
            args:
            - /bin/sh
            - -c
            - date; echo Hello from the Kubernetes cluster
          restartPolicy: OnFailure
