apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: testcronjob
spec: 
  schedule: "*/2 * * * *" # for every 2 min
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: testcronjob 
            image: bash
            command: ["echo", "hello k8s from cron"]
          restartPolicy: OnFailure # restart if on failure