[Backgroundrb-devel] Schedule parser

Scott Ward scott at shefield.com
Wed Jan 30 13:12:25 EST 2008


I wonder if its because you need 7 entries for trigger_args?

>From the docs:

The fields (which can be an asterisk, meaning all valid patterns) are:
    sec[0,59] min[0,59], hour[0,23], day[1,31], month[1,12], weekday[0,6],
year

Looks like you're missing "year".  Of course, that may not be right since
your second example works...

Scotty


-----Original Message-----
From: backgroundrb-devel-bounces at rubyforge.org
[mailto:backgroundrb-devel-bounces at rubyforge.org] On Behalf Of Meng Kuan
Sent: Wednesday, January 30, 2008 9:59 AM
To: backgroundrb-devel at rubyforge.org
Subject: [Backgroundrb-devel] Schedule parser

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
_______________________________________________
Backgroundrb-devel mailing list
Backgroundrb-devel at rubyforge.org
http://rubyforge.org/mailman/listinfo/backgroundrb-devel



More information about the Backgroundrb-devel mailing list