I’m running an amazon EC2 instance with 64 bit Amazon Linux on us-east-1 region and i’ve set the TZ as Australia/Sydney for user ec2-user. The time display is correct. Then I setup 2 cron tasks to start and stop another amazon instance in tokyo:
crontab -l
0 9 * * 1-5 python /home/ec2-user/scripts/instance.py demo ap-northeast-1 test-machine start > start.log
0 23 * * 1-5 python /home/ec2-user/scripts/instance.py demo ap-northeast-1 test-machine stop > stop.log
Which I think they should be run at 9am and 11pm Sydney time from Monday to Friday. But this morning I checked the log and I found the date of start.log is 4 Jul 19:00 and stop.log is 5 Jul 9:00. Which looks very strange. Can anyone give me some advice?
The script has been tested and it can be execute correctly manually and only takes couple of second to run.
Regards,
Bruce
It looks like your scripts ran on the correct timing, but considering UTC. 4 Jul 9:00 GMT == 4 Jul 19:00 in Sydney (GMT +10), right? Please verify your cron settings. Here are some hints.