DD. Asked: 2012-03-29 01:38:35 +0800 CST2012-03-29 01:38:35 +0800 CST 2012-03-29 01:38:35 +0800 CST Crontab schedule in different timezones 772 I would like to schedule my tasks in EST but I want the actual task to run under the default system timezone. Whats the best way of doing this? cron timezone 3 Answers Voted datacompboy 2012-03-29T04:32:44+08:002012-03-29T04:32:44+08:00 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. Best Answer DD. 2012-03-30T03:35:42+08:002012-03-30T03:35:42+08:00 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. womble 2012-03-29T02:34:29+08:002012-03-29T02:34:29+08:00 You can run a separate instance of cron with a different TZ environment variable, or just learn to add or subtract a few hours.
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:
at 7:00 UTC (or timezone you have cron daemon run) three jobs will run, but each have its own TZ variable.
With the CentOS/RHEL version of cron just add the line:
This will run the schedule according to New York time but the task will run in the default time zone.
You can run a separate instance of cron with a different
TZ
environment variable, or just learn to add or subtract a few hours.