Score

Capability

Cronjobs

Define schedules under which the Workload should run as a Kubernetes CronJob.

Refer to the schedules feature for configuration details.

The Score extension file specifies the humanitec/default-cronjob Workload Profile to use which supports the feature.


humanitec.score.yaml (view on GitHub) :

apiVersion: humanitec.org/v1b1
profile: humanitec/default-cronjob

spec:
  schedules:
    6-hour-run:
      containers:
        main-container:
          args:
            - "--hours"
            - "6"
      schedule: "15 1,7,13,19 * * *"

score.yaml (view on GitHub) :

apiVersion: score.dev/v1b1

metadata:
  name: my-cronjob

containers:
  main-container:
    image: registry/my-image:1.0.0
Top