search for: repeat_interval

Displaying 18 results from an estimated 18 matches for "repeat_interval".

2006 Nov 07
2
start a worker when bdrb starts
I am sure..again I am missing something, but I am trying to start a worker, when backgroundrb starts and it doesn''t seem to work. Here is my config/backgroundrb_schedules.yml file: feed_worker: class: feed_worker job_key: feed_worker_key worker_method: do_work trigger_args: repeat_interval: 20.minutes I even tried this from Rails controller: # def start_feed_worker # begin # MiddleMan.schedule_worker(:class => :feed_worker, # :args => "foobar", # :job_key => :feed_worker_key, #...
2006 Nov 20
2
schedule support on latest svn, a question
...tasks support. As per the documentation I created the backgroundrb_schedules.yml with the following: simple_label: :class: :document_sorter_worker :worker_method: :do_work :job: :bleh :trigger_args: :start: <%= Time.now + 5.seconds %> :end: <%= Time.now + 10.minutes :repeat_interval: 1.minute Under lib/workers I have the following class: class DocumentSorterWorker < BackgrounDRb::Worker::RailsBase def do_work(args) logger.info(''DocumentSorterWorker do work'') results[:do_work_time] = Time.now.to_s results[:done_with_do_work] ||= true end...
2007 May 31
0
background worker just stops running after some time
...ages. Here is the yml file: backgroundrb.yml --- :port: 2000 :rails_env: production :host: localhost here is my schedules file: alerts_task: :class: :alerts_worker :job_key: :alerts_key :worker_method: :do_work :trigger_args: :start: <%= Time.now + 5.seconds %> :repeat_interval: <%= 1.hour %> and i start it by doing: />script/backgroundrb start everytime the worker is called, I print an Iteration Time to the logger. While checking on the worker, I noticed that it hadn''t run in several hours (i.e. the Iteration printout was several hours old). I looke...
2007 Dec 30
3
A newbie question regarding BackgroundRb
...mer_sleep: 60 load_rails: true environment: development host: localhost database_yml: config/database.yml acl: deny: all allow: localhost 127.0.0.1 order: deny,allow scheduled_task: :class: :tx_reaper_worker :worker_method: :do_work :trigger_args: :start: <%= Time.now %> :repeat_interval: <%= 1.second % ======= TxReaperWorker is my class which I generated. ======= class TxReaperWorker < BackgrounDRb::Rails def do_work(args) puts "Hello BackgroundRb" end end ======= I started my rails app using rake backgroundrb:start script/server However, I am unable to...
2007 Feb 18
2
backgroundrb launches concurrent instances of same job
...ing a new instance. --Backgroundrb_schedules.yml-- city_updater: :class: :city_updater_worker :job_key: :city_updater :worker_method: :do_work :worker_method_args: scheduled workers require some args, so here you go... :trigger_args: :start: <%= Time.now + 5.seconds %> :repeat_interval: <%= 1.minutes %> It''s currently launching two instances of city_updater, one minute apart fro the other. Hints or tips to avoid this appreciated! Brian
2008 May 03
2
backgroundrb / actionmailer / sendmail
...configuration: --- :backgroundrb: :ip: 0.0.0.0 :port: 11006 :environment: production :debug_log: true :schedules: :quiz_review_sender: :send_review_emails: :trigger_args: :start: <%= Time.now + 30.seconds %> :end: <%= Time.now + 10.years %> :repeat_interval: <%= 20.seconds %> environment.rb configuration: ActionMailer::Base.delivery_method = :sendmail ActionMailer::Base.raise_delivery_errors = true ActionMailer::Base.default_content_type = ''text/html'' Now, when doing the request from rails itself, no problem, I get the emai...
2007 Jul 17
0
Backgroundrb scheduler seems to stop running
I have two scheduled tasks in my rails app: background_schedules.yml mail_sender_1: :class: :mail_sender_worker :job_key: :job_key_mail_sender_1 :worker_method: :do_work :trigger_args: :start: <%= Time.now + 5.seconds %> :end: <%= 1.years.from_now %> :repeat_interval: <%= 60.minutes %> cleanup_1: :class: :cleanup_worker :job_key: :job_key_cleanup_1 :worker_method: :do_work :trigger_args: :start: <%= Time.now + 30.minutes %> :end: <%= 1.years.from_now %> :repeat_interval: <%= 60.minutes %> Every morning between midni...
2007 Jul 19
1
Scheduler skipping schedules
...uld this explain why my scheduler stops triggering? It only seems to work for about 12 - 24 hours before schedules are being skipped... Once I changed the times to using cron trigger in backgroundrb_schedules.yml and set the times to every 37th and 59th minute of the hour, instead of the previous repeat_interval of 60.minutes it seemed to improve but it still stops being triggered within a day and doesn''t seem to start again unless I stop and start background rb... Sometimes this is both my schedules, sometimes just one of them... Other tasks that are directly triggered still work... This is rea...
2006 Nov 05
5
backgroundrb preview
Hi Ezra/skaar, Wow man, the exercise was worth it. The connection closed problem with socket as i mentioned in my earlier mails...completely disappeared, and now i can connect only once to the socket and keep reading..till end of its days. Literally impossible with older release of backgroundrb. This could also potentially solve the issues people were having with ActiveRecord. As i said
2008 Jan 13
2
{worker} after :end-time worker freaks out
...0. My Test-Files backgroundrb.yml - - - - - - :backgroundrb: :port: 11006 :ip: localhost :environment: development :schedules: :mytest_worker: :doit: :trigger_args: :start: <%= Time.now + 1.seconds %> :end: <%= Time.now + 1.minute %> :repeat_interval: <%= 10.seconds %> - - - - - - mytest_worker.rb - - - - - - class MytestWorker < BackgrounDRb::MetaWorker set_worker_name :mytest_worker def create(args = nil) # this method is called, when worker is loaded for the first time @counter=0 end def doit @counter +=...
2007 May 15
4
Need help with singleton worker
...gt; 20070515-13:55:23 (10864) Schedule triggered: #<struct #<Class:0xb7ddb4f0> job=#<Proc:0xb7cfb7d8@/var/www/html/apps/xxx/vendor/plugins/backgroundrb/server/lib/backgroundrb/middleman.rb:319>, trigger=#<BackgrounDRb::Trigger:0xb7b60054 @start_time=Tue May 15 13:55:22 CEST 2007, @repeat_interval=1, @end_time=Tue May 15 13:55:23 CEST 2007>, earliest=Tue May 15 13:55:23 CEST 2007, last=Tue May 15 13:55:23 CEST 2007> 20070515-13:55:27 (10864) Starting worker: my_worker foo (my_worker_foo) (_a_) 20070515-13:55:31 (10864) Loading Sechedule: job_keyfooargs_b_classmy_worker trigger_typetrig...
2007 Apr 18
5
[BUG] worker stopping abruptly
...SS feed from Yahoo news and stores it in a DB. The worker is scheduled to run at every 40 minutes and my background_schedules.yml looks like this: feed_worker: :class: :feed_worker :job_key: :feed_worker_key :worker_method: :do_work :trigger_args: :start: <%= Time.now + 5 %> :repeat_interval: <%= 40*60 %> So story is, worker stops working suddenly. no exception thrown either in background.log or background_server.log. To also, to make sure that backgroundrb threads doesn''t eat my excpetion my code looks like this: def do_work(args) begin logger.info "Starti...
2007 Feb 07
1
Repeatedly dying with "failed to find slave socket"
...rb_server.log, the final entry is this : 20070206-10:41:45 (5189) Schedule triggered: #<struct #<Class: 0x2afb643b56c0> job=#<Proc:0x00002afb63ed83c8 at .../vendor/plugins/ backgroundrb/server/lib/backgroundrb/middleman.rb:355>, trigger=#<BackgrounDRb::Trigger:0x2afb6546ccc0 @repeat_interval=600, @end_time=nil, @start_time=Tue Feb 06 03:41:45 -0800 2007>, earliest=Tue Feb 06 10:41:45 -0800 2007, last=Tue Feb 06 10:41:45 -0800 2007> 20070206-10:41:45 (5189) failed to find slave socket - (RuntimeError) 20070206-10:41:45 (5189) /usr/lib64/ruby/gems/1.8/gems/slave-1.2.0/lib/ s...
2007 Jun 05
0
typo in the README?
...r "Trigger" it says: The plain trigger takes three arguments: > > | :start => time, :end => time, :interval => seconds > > If the end argument is omitted, the event will trigger at the interval as > long as the server is running. > Shouldn''t it be :repeat_interval? Everything below it in both the backgroundrb_schedules.yml and the MiddleMan section seems to indicate this. If so, how can I go about changing it? download the trunk and submit a patch? I wouldn''t mind helping out with documentation, especially parts I found confusing when I first sta...
2007 Feb 14
1
cron like behaviour?
Hi I have previously used railscron for server-side manipulation of the database but had a heap of trouble working with it. BackgrounDRB was suggested to me by a friend. I upload some files via acts_as_attachment and these go lie in a dir structure that i desire. What I want from the background process is to periodically (not user initiated) do some file-structure manipulation i.e. I want to
2006 Oct 30
11
BackgrounDRb 0.2.0 Release! Complete rewrite.
...uire ''active_support'' MiddleMan.schedule_worker( :class => :example_worker, :job_key => :schedule_test, :worker_method => :other_method, :trigger_args => { :start => Time.now + 5.seconds, :end => Time.now + 10.minutes, :repeat_interval => 30.seconds } The cron trigger uses a similar syntax to cron found on UNIX systems: MiddleMan.schedule_worker( :class => simple_class, :job_key => :schedule_test, :worker_method => :arg_method, :worker_method_args => "my argument to arg_method&quo...
2006 Oct 30
1
new BackgroundRB
...> > :class => :example_worker, > > :job_key => :schedule_test, > > :worker_method => :other_method, > > :trigger_args => { > > :start => Time.now + 5.seconds, > > :end => Time.now + 10.minutes, > > :repeat_interval => 30.seconds > > } > > > > The cron trigger uses a similar syntax to cron found on UNIX systems: > > > > MiddleMan.schedule_worker( > > :class => simple_class, > > :job_key => :schedule_test, > > :worker_method => :...
2007 Nov 14
7
BackgrounDRb version 1.0RC1 available now
...r: | :worker_method: foobar | :trigger_args: */5 * * * * * * * Normal Unix scheduler | :backgroundrb: | :ip: localhost | :port: 11006 | :schedules: | :foo_worker: | :start: <%= Time.now + 5.seconds %> | :end: <%= Time.now + 10.minutes %> | :repeat_interval: <%= 1.minute %> * Plain config | :backgroundrb: | :ip: localhost | :port: 11006 === Scheduling There are three schemes for periodic execution and scheduling. - Cron Scheduling You can use configuration file for cron scheduling of workers. Method specified in configuration...