Specifying Resque Jobs Scheduled Using Resk Scheduler

I am working on a rails app that uses resque and resque-scheduler to schedule an email to be sent.

Is there a way to get a list of all scheduled jobs, or even better a list of jobs with a specific argument?

I've tried several things like Resque.schedule

, but the best I can get is the hash:

{"send_email"=>
  {
    "class"=>"EmailSendingJob",
    "args"=>nil,
    "queue"=>"email_queue",
    "description"=>"Runs the perform method in EmailSendingJob"
  }
}

      

+3


source to share


1 answer


I really need a list of all pending jobs, which are one-off jobs that will be queued in the future while the scheduled jobs repeat on a regular basis.

find_delayed_selection

the method is exactly what I need, it allows me to find pending jobs that have arguments that match certain criteria. This method is not available in the current stable release of resque-scheduler 4.0.0, so I ended up using upstream.



Here is the pull request link where the method was added https://github.com/resque/resque-scheduler/pull/452

+2


source







All Articles