apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: send-legal-mail-to-prisons-api-cjsm-directory
spec:
  schedule: "15 3 * * *"
  concurrencyPolicy: Forbid
  failedJobsHistoryLimit: 5
  startingDeadlineSeconds: 6000
  successfulJobsHistoryLimit: 5
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: cjsm-directory
              image: ghcr.io/ministryofjustice/hmpps-devops-tools
              args:
                - /bin/sh
                - -c
                - curl -XPOST http://send-legal-mail-to-prisons-api/cjsm/directory/refresh
          restartPolicy: Never