What Time Zone Does Crontab Use? Compare Cron Runs With UTC

A five-field cron expression has no time zone field. A crontab follows its cron implementation and configuration. For Cronie, you can set CRON_TZ in the crontab; the linked parser calculates runs in UTC.

Worked example

Example user crontab for a scheduler that supports CRON_TZ

CRON_TZ=Asia/Singapore
0 9 * * 1-5 /usr/bin/true

Steps

  1. Check the target host's cron implementation and read its crontab manual. If it supports CRON_TZ, set the zone that describes when the job should run.
  2. Read the example as 09:00 on weekdays in Asia/Singapore. To preview equivalent UTC times in the parser, enter only the five schedule fields as 0 1 * * 1-5.
  3. Compare a scheduled run or a test job's timestamp to the expected UTC time. Cronie can log in the daemon's local time zone even when CRON_TZ controls the job schedule.

What to check

  • Leave CRON_TZ and the command out of the online parser. Its result should show 01:00 UTC for this example.
  • A fixed UTC offset will not preserve local time throughout the year for a zone that observes daylight saving time. Check dates on both sides of a transition with the real scheduler.

Preview the UTC schedule

References