resque-scheduler icon indicating copy to clipboard operation
resque-scheduler copied to clipboard

Dynamic scheduling seems to be incompatible scheduler rake task

Open reagleton opened this issue 11 years ago • 1 comments

If you set resque-scheduler to be dynamic and create a job it works perfectly well without having to run the scheduler rake task, e.g.

   Resque::Scheduler.load_schedule!
   Resque::Scheduler.load_schedule_job('job_name', {:class => 'MyJob', 'every' => "60s"})

If you then start the scheduler rake task, this job will stop running until such time as the rake task is exited. It then resumes its normal schedule.

Any delayed jobs added via Resque.enqueue_at will not run until the rake task is started.

Not sure if this is related or a separate issue but if you want to run a regular delayed job, this will only run if the scheduler rake task is already started. If you schedule the job (and it does appear under the Resque Schedule tab) and then start the rake task, the jobs will sit in the schedule waiting to be queued even if the time they should have run is passed (they can be enqueued manually). Once these "stale" jobs are removed or queued, any delayed jobs created after the rake task was started will queue as per normal.

reagleton avatar Feb 21 '14 05:02 reagleton

@reagleton which version of resque-scheduler are you using?

bugant avatar Jun 24 '14 07:06 bugant