Home โบ Cron errors โบ Kubernetes
Kubernetes CronJob runs at the wrong time
Why this happens
Without spec.timeZone the schedule uses the controller's time zone, usually UTC. 09:00 UTC is 14:30 in India, not 09:00.
Wrong and right
0 9 * * *Runs on: Fri 01 Jan, 09:00, Sat 02 Jan, 09:00, Sun 03 Jan, 09:00, Mon 04 Jan, 09:00, Tue 05 Jan, 09:00, Wed 06 Jan, 09:00, Thu 07 Jan, 09:00
30 3 * * *At 03:30 UTC. First runs after 1 Jan 2027 (UTC): Fri 01 Jan, 03:30, Sat 02 Jan, 03:30, Sun 03 Jan, 03:30, Mon 04 Jan, 03:30, Tue 05 Jan, 03:30
How to fix it
- Set spec.timeZone: "Asia/Kolkata" (Kubernetes 1.27+) and keep 0 9 * * *.
- On older clusters, convert to UTC by hand: 09:00 IST is 30 3 * * *.
- Document the zone next to the schedule.
The Kubernetes format at a glance
Fields in order: minute (0-59), hour (0-23), day-of-month (1-31), month (1-12), day-of-week (0-7, 0 and 7 = Sunday).
Set spec.timeZone (Kubernetes 1.27+) to a name like Asia/Kolkata. Without it the schedule follows the controller's time zone, usually UTC.
The fixed schedule in other systems
If you are moving this schedule to another scheduler, these are the equivalents of 30 3 * * *:
| System | Expression |
|---|---|
| Quartz | 0 30 3 * * ? |
| Spring | 0 30 3 * * * |
| Crontab | 30 3 * * * |
| AWS EventBridge | 30 3 * * ? * |
| Jenkins | 30 3 * * * |
| GitHub Actions | 30 3 * * * |
| node-cron | 30 3 * * * |
| Apache Airflow | 30 3 * * * |
| Azure Functions | 0 30 3 * * * |
| Google Cloud Scheduler | 30 3 * * * |
Try it yourself
The tester below starts with the fixed expression. Change it and watch the schedule update.
Your week at a glance
Upcoming runs
| # | Local | UTC | From now |
|---|
Copy-ready code
Frequently asked questions
How do I know which zone my cluster uses?
Check the kube-controller-manager node time zone, or set spec.timeZone and stop depending on it.
More Kubernetes fixes
See the full Kubernetes cron builder or convert between formats.