Skip to content
Cronjobber is a cronjob controller for Kubernetes with support for time zones
Branch: master
Clone or download
hiddeco Merge pull request #8 from hiddeco/release/0.1.x
Housekeeping: merge release/0.1.x back into master
Latest commit 3aca9c0 Apr 6, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Enable CircleCI builds for tags Mar 6, 2019
cmd/cronjobber Initial commit Mar 2, 2019
deploy Bump version number from '0.1.0' -> '0.1.1' Apr 6, 2019
example Typo: 'timeZone' -> 'timezone' Apr 6, 2019
hack Initial commit Mar 2, 2019
pkg Use schedule location during earliestTime calcs Apr 6, 2019
scripts Setup CI Mar 3, 2019
.dockerignore Setup CI Mar 3, 2019
.gitignore Prepare changelog for 0.1.1 release Apr 6, 2019
Dockerfile Setup CI Mar 3, 2019
Gopkg.lock Setup CI Mar 3, 2019
Gopkg.toml Setup CI Mar 3, 2019
LICENSE Initial commit Mar 2, 2019
Makefile Newline Apr 6, 2019 Typo: 'timeZone' -> 'timezone' Apr 6, 2019


CircleCI Go Report Card Docker Repository on Quay License GitHub release

Cronjobber is the cronjob controller from Kubernetes patched with time zone support.


# Install CustomResourceDefinition
$ kubectl apply -f
# Setup service account and RBAC
$ kubectl apply -f
# Deploy Cronjobber
$ kubectl apply -f


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.

kind: TZCronJob
  name: hello
  schedule: "*/1 * * * *"
  timezone: "Europe/Amsterdam"
          - name: hello
            image: busybox
            - /bin/sh
            - -c
            - date; echo "Hello, World!"
          restartPolicy: OnFailure


There has been a long outstanding (and now closed) issue to add time zone support to the CronJob kind in Kubernetes, including a fully working PR which actually made it possible. SIG Apps and in SIG Architecture decided however against adding it because of the downside of having to manage and distribute time zone databases.

People are now encouraged to innovate and solve these kinds of problems in the ecosystem rather than core.

Instead of putting this in Kubernetes the ask is to:

  1. Develop this in the ecosystem (e.g., a controller) that others can use. Distribute it, solve the problems there, and see what update looks like
  2. If the solution is widely adopted and can be used by everyone (including small scale, multi-cluster, etc) then it could be considered for core Kubernetes

-- mattfarina (Matt Farina) on Jan 26, 2018

Cronjobber is the most simple answer to this: it is the original PR on top of a more recent version of the cronjob controller, with some glue added to make it an independent controller.


This application is derived from open source components. You can find the original source code of these components below.

You can’t perform that action at this time.