apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: sometask-cronjob
spec:
  schedule: "*/1 * * * *"
  jobTemplate:
    spec:
      completions: 10
      parallelism: 5
      template:
        spec:
          containers:
          - name: sometask
            image: bash
            command: ["bash"]
            args: ["-c",  "if [ $(( $RANDOM % 2)) == 1 ]; then exit 1; fi; echo working ...; sleep 60; echo done;"]
          restartPolicy: Never