apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: pie-counter
spec:
  # concurrencyPolicy Choices:
  #   Allow (it's OK to run concurrent jobs)
  #   Forbid (no concurrent jobs) 
  #   Replace (replace unfinished job with new one)
  concurrencyPolicy: Allow 
  schedule: "*/1 * * * *" # Run the job every minute
  jobTemplate:
    spec:
      template:
        spec:
          restartPolicy: OnFailure # OnFailure or Never
          containers:
          - name: pie-counter
            image: alpine
            command:
            - "sh"
            - "-c"
            - "echo 'scale=1000; 4*a(1)' | bc -l;sleep 2;"