Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

scheduling dynamic jobs in resque scheduler

I'm trying to test out scheduling jobs in future using rails 3 and resque scheduler:

Following is the code I'm using but I'm getting NoMethodError set_schedule.

 Resque.set_schedule("1", {
  :cron => "30 6 * * 1",
  :class => "Notify",
  :queue => "username",
  :message => 'notification message'      
})

I tried using a simple enqueue Resque.enqueue(Notify, params[:message]) and this works fine.

UPDATE:

Following is the error I'm getting:

undefined method `set_schedule' for Resque Client connected to redis://bass.redistogo.com:9064/0:Module
like image 399
ed1t Avatar asked Mar 26 '11 14:03

ed1t


1 Answers

Scheduling in resque is (now) in a separate gem. You can find all the information you need at:

https://github.com/bvandenbos/resque-scheduler/

like image 176
Luke Chadwick Avatar answered Oct 06 '22 01:10

Luke Chadwick