resque / resque/resque-scheduler

'every' interval seemingly not respecting 'first_at' for non-persistent schedule

Open
#702 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
1.7k
Forks
477
PR merge metrics
No merged PRs in 30d

Description

I have a non-persistent schedule with a job that has the following in it's configuration (there is not a cron config key):

...
every: ['1d', {first_at: Chronic.parse('04:31')}]`
...

Chronic.parse outputs: 2020-12-12 04:31:00 +0000

I would expect this to schedule the job for 4:31 UTC upon startup and then run every day at 4:31 UTC. However, the job is getting continually queued and run at 21:51:48 UTC. In fact, every job that has an interval of 1d with different first_at values is getting run at that same 21:51:48 UTC.

What am I missing?

Resque: 1.27.4
resque-scheduler: 4.4.0
rufus-scheduler: 3.6.0

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

Start by reproducing the non-persistent every: ['1d', {first_at: Chronic.parse('04:31')}] schedule with the stated Resque, resque-scheduler, and rufus-scheduler versions. Trace how first_at is handled for daily intervals and compare it with the observed 21:51:48 UTC runs; done means explaining or correcting the discrepancy and verifying that different first_at values are respected.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.