A cron expression contains no timezone. It runs in the timezone of the process that reads it, and that process is usually a daemon on a server whose clock configuration you did not write. The same 0 2 * * * can mean 2 AM in Tokyo, 2 AM in London, or 2 AM UTC, which are three different instants.

Where the timezone comes from

Context Timezone source
Linux crond The daemon's local timezone, usually /etc/localtime
Docker container Whatever the base image sets, frequently UTC
Kubernetes CronJob UTC unless .spec.timeZone is set
systemd timer Local timezone unless OnCalendar includes a zone
Quartz JVM default unless a timezone is passed
GitHub Actions UTC

The failure mode is predictable. A job is written and tested on a laptop in local time, deployed to a container that runs UTC, and suddenly fires eight hours off. Nothing in the expression changed; the interpreter did.

Make it explicit

On Linux, cronie supports CRON_TZ at the top of a crontab:

CRON_TZ=Asia/Shanghai

# 09:00 Shanghai time, every weekday
0 9 * * 1-5 /usr/local/bin/report

The variable is not portable to every cron implementation. An alternative is to keep the daemon in UTC and convert the desired local time into UTC once:

# 09:00 Asia/Shanghai == 01:00 UTC
0 1 * * 1-5 /usr/local/bin/report

The second approach is stable across DST only if the target zone does not observe DST. For zones that do, a fixed UTC hour drifts by one hour twice a year.

Kubernetes added a timeZone field to CronJob:

spec:
  schedule: "0 9 * * 1-5"
  timeZone: "Asia/Shanghai"

Before that field existed, the workaround was to schedule in UTC and accept the drift.

Daylight saving is the hard part

In a zone that springs forward, the wall-clock hour between 02:00 and 03:00 does not exist on the transition day. In a zone that falls back, 01:00–02:00 occurs twice. Implementations differ:

  • Some skip the job entirely on the missing hour.
  • Some run it at the first valid instant after the gap.
  • Some run twice during the repeated hour.

A daily backup at 02:30 in Europe/London will therefore behave differently in March and October. For anything critical, avoid scheduling inside the transition window, or run the job in UTC and let the display layer handle local time.

Testing the schedule, not the expression

The only reliable check is the next-run list in the target timezone. Paste the expression into the next-run calculator, select the server's zone, and compare the timestamps with the intended local times. Do this for a date after the next DST transition, not only for today.

If the times look right but the job still runs at the wrong moment, check whether a wrapper script sets TZ, whether the container mounts a different /etc/localtime, and whether the scheduler is actually the one you think it is. A systemd timer and a crontab entry can both exist, and only one of them may be enabled.

A practical policy

  1. Store and schedule in UTC for infrastructure jobs.
  2. Use an explicit timezone for jobs whose meaning is local, such as “9 AM on weekdays for the sales team”.
  3. Never rely on the server's default zone without checking it.
  4. Keep critical jobs out of the 01:00–03:00 local window on DST transition dates.
  5. Record the intended timezone next to the expression in the repository.

The expression is only half the schedule. The other half is the clock that reads it.