Crontab schedule in different timezones

Solution 1:

Just set in your crontab file variable TZ=Some/Where You can set TZ several times to have separate jobs rund in separate timezones. For example:

TZ=UTC
* 7 * * * root date | mail root
TZ=CEST
* 7 * * * root date | mail root
TZ=PCT
* 7 * * * root date | mail root

at 7:00 UTC (or timezone you have cron daemon run) three jobs will run, but each have its own TZ variable.

Solution 2:

With the CentOS/RHEL version of cron just add the line:

CRON_TZ=America/New_York

This will run the schedule according to New York time but the task will run in the default time zone.

Tags:

Timezone

Cron