Multiple instances of CRON_TZ inside a cron file (CentOS)
I don't think you can put both timezones in /etc/crontab
, but you can make different files in /etc/cron.d
each of which has a different CRON_TZ
and TZ
setting.
For instance, /etc/cron.d/chicago
:
CRON_TZ=America/Chicago
25 12 * * * root echo Chicago >> /tmp/TZ
And /etc/cron.d/new_york
:
CRON_TZ=America/New_York
25 13 * * * root echo New_York >> /tmp/TZ
At 17:25 UTC, the content of /tmp/TZ
is:
Chicago
New_York