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
Scheduling in resque is (now) in a separate gem. You can find all the information you need at:
https://github.com/bvandenbos/resque-scheduler/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With