Can whenever take timezone from config?
Author: ShwetakaleCreated Sep 14, 2016Updated Jun 7, 2025
Labelsfeature
Currently when we write cron jobs using whenever application (rails) timezone is not considered?
For ex. If in config/application.rb I write
config.time_zone = 'Asia/Kolkata'and in scheduler
every :day, :at => '09:30am' do
rake "leave_reminder:daily"
endIt is written as it is to cron. My application timezone is different than server and I don't want to change time zone of my server. So when I write cron job I need to change time to server's time zone.
Can we consider server's and applications timezone and convert accordingly so each time people don't have to worry about timezone?
Source: javan/whenever