[Backgroundrb-devel] Schedule parser

Meng Kuan mengkuan at gmail.com
Wed Jan 30 12:59:19 EST 2008


Hi,

I was trying to schedule a worker to run during the midnight hour  
like this:

:schedules:
   :collector:
     :process_something:
       :trigger_args: 30 * 0 * * 2,3,4,5,6


When I try to start backgroundrb, the "collector" worker failed to  
start up and I find this in backgroundrb_server.log:


/home/mengkuan/apps/testrailsapp/current/vendor/plugins/backgroundrb/ 
server/cron_trigger.rb:160:in `local': argument out o
f range (ArgumentError)
         from /home/mengkuan/apps/testrailsapp/current/vendor/plugins/ 
backgroundrb/server/cron_trigger.rb:160:in `fire_time
_after'
         from /home/mengkuan/apps/testrailsapp/current/vendor/plugins/ 
backgroundrb/server/meta_worker.rb:266:in `new_load_s
chedule'
         from /home/mengkuan/apps/testrailsapp/current/vendor/plugins/ 
backgroundrb/server/meta_worker.rb:258:in `each'
         from /home/mengkuan/apps/testrailsapp/current/vendor/plugins/ 
backgroundrb/server/meta_worker.rb:258:in `new_load_s
chedule'
         from /home/mengkuan/apps/testrailsapp/current/vendor/plugins/ 
backgroundrb/server/meta_worker.rb:183:in `worker_ini
t'
         from /home/mengkuan/apps/testrailsapp/current/vendor/plugins/ 
backgroundrb/framework/packet/worker.rb:20:in `start_
worker'
         from /home/mengkuan/apps/testrailsapp/current/vendor/plugins/ 
backgroundrb/framework/packet/packet_master.rb:139:in
  `fork_and_load'
         from /home/mengkuan/apps/testrailsapp/current/vendor/plugins/ 
backgroundrb/framework/packet/packet_master.rb:98:in
`load_workers'
         from /home/mengkuan/apps/testrailsapp/current/vendor/plugins/ 
backgroundrb/framework/packet/packet_master.rb:93:in
`each'
         from /home/mengkuan/apps/testrailsapp/current/vendor/plugins/ 
backgroundrb/framework/packet/packet_master.rb:93:in
`load_workers'
         from /home/mengkuan/apps/testrailsapp/current/vendor/plugins/ 
backgroundrb/framework/packet/packet_master.rb:19:in
`run'
         from /home/mengkuan/apps/testrailsapp/current/vendor/plugins/ 
backgroundrb/server/master_worker.rb:163:in `initiali
ze'
         from script/backgroundrb:41:in `new'
         from script/backgroundrb:41


However, if I modify the trigger_args line like the following, the  
worker runs fine:

:schedules:
   :collector:
     :process_something:
       :trigger_args: 30 * 0,1 * * 2,3,4,5,6


cheers,
mengkuan


More information about the Backgroundrb-devel mailing list