javan / javan/whenever

Can whenever take timezone from config?

Open
#662 30 comments 13 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Ruby
Stars
8.9k
Forks
715
PR merge metrics
No merged PRs in 30d

Description

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"
end

It 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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names config/application.rb and a scheduler block, but no repository file or test. Start by reviewing the 30-comment discussion and the Rails timezone configuration example. Done should define and verify how an application timezone is converted to the server's cron timezone without requiring server timezone changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.