resque / resque/resque-scheduler
Schedule persistence
Open
@ksinkar is already working on this.
Since Feb 18, 2014.
bug
- Dominant language
- Ruby
- Stars
- 1.7k
- Forks
- 477
- PR merge metrics
- No merged PRs in 30d
Description
If you have scheduled a job with Resque.set_schedule() for a particular configuration. Now if one changes that configuration, the change is seen once in the scheduler (view), but once the job has been queued at its schedule, the scheduler then shows the previous configuration of that schedule.
e.g.
Initial configuration
name = "export_data"
Resque.remove_schedule(name)
config = {}
config[:description] = 'This is the schedule for periodic export data as set by the user'
config[:class] = 'ExportData'
config[:args] = [domain_id, user_id]
config[:cron] = "* 23 * * *"
config[:persist] = true
Resque.set_schedule(name, config)
Configuration which is changed later
Note the change in the config[:cron]
name = "export_data"
Resque.remove_schedule(name)
config = {}
config[:description] = 'This is the schedule for periodic export data as set by the user'
config[:class] = 'ExportData'
config[:args] = [domain_id, user_id]
config[:cron] = "1 23 * * *"
config[:persist] = true
Resque.set_schedule(name, config)
Now when the the next time the system time is 23 hours, then the job with the configuration of
"1 23 * * "
is run, but after that the scheduler reverts to the previous configuration i.e.
" 23 * * *"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.