This works around a time zone problem, the server is in UTC, and users in a different time zone (with daylight saving time). define local action and use in cronjob.
schedule.rb
require "tzinfo"
def local(time)
TZInfo::Timezone.get('America/Denver').local_to_utc(Time.parse(time))
end
every :sunday, at: local("11:58 pm") do
end
Hope this helps you.
source
share