问题
So I think there is around 30 minutes between each time zone. I want to run my script cron.php for at 12 am (midnight) for every time zone. How can I do this?
I was looking at this code:
TZ=UTC
* 7 * * * root date | mail root
TZ=CEST
* 7 * * * root date | mail root
TZ=PCT
* 7 * * * root date | mail root
Does this work?
What does any of the code mean?
Any better solution?
回答1:
Most time zones are 1 hour apart, with a couple of exceptions. The above code will run at 7 AM in each of the time zones listed.
It might be better to have a script that runs every hour and just kick that off once in your own time zone
来源:https://stackoverflow.com/questions/44961104/run-cron-job-at-12-am-in-every-time-zone