devon66h
devon66h

Reputation: 557

Cron job every day at 2am EST

How would I go about scheduling a cron tab every night at 2AM EST time?

It's my impression that the cron schedule below will run at 2AM UTC not EST. Is that correct?

enter image description here

Going further: to add to this, how could I have the cron schedule run at 2AM on each of the six US timezones?

Upvotes: 3

Views: 7591

Answers (1)

MUHAMMAD ILYAS
MUHAMMAD ILYAS

Reputation: 1450

It's my impression that the cron schedule below will run at 2AM UTC not EST. Is that correct?

Yes, cron job will run on UTC time.

So to register cron on 2 AM EST you have to convert that time into UTC, and the time is in 24-hours clock

EST:

New York, NY, USA ( EST UTC-5) 2 AM

Diff from UTC is -5

UTC

In UTC time will be ( 7 - 5 = 2 EST ) 7AM

CRON at 0 7 * * *

and for multiple 2AM US timezone first watch for diff and register cron on that UTC.

also, watch for daylight savings

Upvotes: 2

Related Questions