I'm trying to set a crontab job on Amazon Lightsail to run at 11:55 PM EST, daily. The job runs a pretty simple Python script. The job executes, but at 6:55 PM EST instead. I've tried setting both CRON_TZ=America/New_York
within crontab, as well as changing the local time to EST within timedatectl, but neither updates the time to run EST.
How can I get my job to run at 11:55 PM EST on Lightsail?
Here is my crontab code:
CRON_TZ=America/New_York
53 23 * * * /usr/bin/python3.6 /home/ubuntu/path-to-script/script.py
and here is my time zone information:
ubuntu@ip-###:~$ timedatectl
Local time: Wed 2021-01-06 10:24:42 EST
Universal time: Wed 2021-01-06 15:24:42 UTC
RTC time: Wed 2021-01-06 15:24:43
Time zone: America/New_York (EST, -0500)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no
question from:
https://stackoverflow.com/questions/65598580/setting-crontab-task-in-amazon-lightsail-to-est 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…