Open kirinnee opened 9 months ago
👋
According to the documentation of the CronJobSpec
section, all time zones from this Wikipedia page should work, which includes Asia/Singapore.
I just extended the documented CronJob example by the timeZone
field as following:
apiVersion: batch/v1
kind: CronJob
metadata:
name: hello
spec:
schedule: "* * * * *"
timeZone: Asia/Singapore
jobTemplate:
spec:
template:
spec:
containers:
- name: hello
image: busybox:1.28
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
- date; echo Hello from the Kubernetes cluster
restartPolicy: OnFailure
It applies correctly for me:
$ kubectl version
Client Version: v1.28.3
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.27.6
$ kubectl apply -f cj.yaml
cronjob.batch/hello created
Are you using the correct API version batch/v1
? If so, could you please share the relevant portions of your CronJob manifest?
when trying to apply the
timeZone
field for Kubernetescronjob
kind:Where can I check the supported timezone or if this feature is available?