Open MohamedBassem opened 7 years ago
Same issue for me. In my case, It do not pick the timezone configuration but pick my system time.
System time 2.2.2 :023 > Time.now => 2017-11-08 19:04:54 +0530 Scheduling few minute later of above time work Crono.perform(DataCsvReport).every 1.day, at: {hour: 19 min: 10}
Time configured in application 2.2.2 :024 > Time.zone.now => Wed, 08 Nov 2017 08:35:14 EST -05:00 Scheduling few minute later of above configured time do not work Crono.perform(DataCsvReport).every 1.day, at: {hour: 08 min: 40}
We solved it this way:
offset = Time.now.zone
Crono.perform(Worker).every 1.day, at: "00:00 #{offset}"
Hi,
I have a crontab that contains:
Rails' timezone is set to UTC+4. According to that, the job should always run at
20:00 UTC
everyday. The problem is that it sometimes run on00:01 UTC
too for some reason that I don't understand. You can see what I mean from the job's logs:So the problem is that the
at
option is sometimes interpreted as UTC, sometimes interpreted as Rails timezone and sometimes both. Any help?