Skip to main content

Time Zone Cronjobs


The Cloud Platform uses UTC, but sometimes you may need a Cronjob to run at specific times of a day in the UK (including during BST). Kubernetes Cronjobs do not support time zones, so to enable running cronjobs at specific UK times, you can use TZ Cronjobber(a cronjob controller for Kubernetes with support for time zones).


Instead of creating a CronJob like you normally would, you create a TZCronJob, which works exactly the same but supports an additional field: .spec.timezone. Set this to the time zone you wish to schedule your jobs in and Cronjobber will take care of the rest.

In this example the timezone is set to “Europe/London” and scheduled every day at 14:10. During BST the job will trigger at 13:10 UTC, but the rest of the year it will trigger at 14:10 UTC.


kind: TZCronJob
  name: hello
  schedule: "10 14 * * *"
  timezone: "Europe/London"
          - name: hello
            image: bitnami/nginx:latest
            - /bin/sh
            - -c
            - date; echo "Hello, World!"
          restartPolicy: OnFailure

Applying tzcronjob in your Namespace

Using the above example create a tzcronjob.yaml file and apply it to your namespace in the kubernetes cluster.

  kubectl apply --filename tzcronjob.yaml --namespace [your namespace]

Verify that the tzcronjob is created.

  kubectl get tzcronjob --namespace [your namespace]
This page was last reviewed on 17 January 2022. It needs to be reviewed again on 17 April 2022 .
This page was set to be reviewed before 17 April 2022. This might mean the content is out of date.