apiVersion: batch/v1
kind: CronJob
metadata:
  name: crawl-cubanews
  labels:
    project: cubanews
spec:
  schedule: "0 6 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: crawl-cubanews
              image: curlimages/curl:7.72.0
              imagePullPolicy: IfNotPresent
              command:
                - /bin/sh
                - -ec
                - "curl --location --request GET 'https://cubanews.icu/api/clearold/cubanews'"
          restartPolicy: OnFailure
