Configure dynamic schedules
masterDynamic schedules can be set, updated, or removed programmatically while the scheduler is running without requiring a restart.
To enable dynamic scheduling, you must set Resque::Scheduler.dynamic = true during initialization.
Dynamic schedules can optionally persist across scheduler restarts by setting the persist: true option in the configuration hash.
# Enabling dynamic scheduling
Resque::Scheduler.dynamic = true
# Setting a dynamic schedule
name = 'send_emails'
config = {}
config[:class] = 'SendEmail'
config[:args] = 'POC email subject'
config[:every] = ['1h', {first_in: 5.minutes}]
config[:persist] = true
Resque.set_schedule(name, config)
# Removing a dynamic schedule
Resque.remove_schedule(name)