Skip to content

Instantly share code, notes, and snippets.

@ChengLong
Last active August 29, 2015 14:04
Show Gist options
  • Save ChengLong/8988923379d603712eb3 to your computer and use it in GitHub Desktop.
Save ChengLong/8988923379d603712eb3 to your computer and use it in GitHub Desktop.
Timezone in Cron

If you find that your cronjobs are not launched at the specified time, chances are it's a timezone issue.

The timezone of cron is specified in /etc/timezone, according to cron's man page:

The daemon will use, if present, the definition from /etc/timezone for the timezone.

If you change the timezone of the machine but has NOT restart cron, cron will still use the old timezone. In order to make your timezone effective, restart cron sudo service cron restart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment