ruby on rails - Resque Scheduler plugin for the scheduled job not working -


i using plugin scheduled job.but not working. confused points,should need create job class , set name in schedule file?when testing then,should run rescue scheduler , resque worker both or 1 of them.

thanks in advance.

my resque scheduler config... need these pieces:

yml file (config/resque_scheduler.yml):

every_1_minute:   cron: "* * * * *"   class: everyminute   queue: some_queue   description: tasks perform every minute 

config/initializers/resque.rb:

require 'resque_scheduler' resque.schedule = yaml.load_file(file.join(rails.root, 'config/resque_scheduler.yml')) 

ruby class (lib/every_minute.rb or somewhere in load path):

class everyminute   def self.perform     puts "hello every minute!"   end end 

you need run

rake resque:scheduler rake resque:work 

the resque:scheduler process periodically queues jobs, hence scheduling. , workers jobs blindly. why need both schedule , run jobs periodically.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -