I've configured my timezone on server with timedatectl
, e.g.:
timedatectl set-timezone Europe/Budapest
I've put timezone settings to my crontab configuration like these:
CRON_TZ=America/Cancun
0 12 * * * echo "not scheduled in time"
# or
TZ=America/Cancun
0 12 * * * echo "not scheduled in time"
# or
0 12 * * * TZ=America/Cancun echo "not scheduled in time"
But doesn't matter what TimeZone configuration I try to set in the crontab (America/Cancun), the jobs are always scheduled by the timezone configured by the timedatectl
(Europe/Budapest).
I even restarted the cron service:
sudo service cron restart
I would assume that CRON_TZ
or TZ
in crontab should add some "independence" to the schedule from the system time configuration.
What am I doing wrong here?
Why the schedule in crontab is not relative to the timezone configured by the timedatectl
.
I'm using debian on AWS.