Displaying 20 results from an estimated 37 matches for "trigger_arg".
Did you mean:
trigger_args
2007 Dec 08
3
Multiple Worker Methods on Different Schedules
Quick question: If I want to schedule different worker methods defined in
the same worker to trigger at different times, is this possible? Would the
following scheduler yaml work?
:schedules:
:foo_worker:
:worker_method: method1
:trigger_args: 0 */10 * * * * *
:job_key: some_key_1
:foo_worker:
:worker_method: method2
:trigger_args: 0 */15 * * * * *
:job_key: some_key_2
Would this work? Is there some other way to do it? Would the second method
need to be pulled into a separate worker?
Thanks,
Andy
-------------- n...
2008 Jan 28
4
Scheduling same worker/method at different times with different args
...l)
# this method is called, when worker is loaded for the first time
end
def experiment(args = {})
logger.info "#{Time.now} - Experiment fired at #{args[:repeat_second]}
second mark."
end
end
In backgroundrb.yml:
:schedules:
:experiment_worker:
:experiment:
:trigger_args: "0 * * * * * *"
:data:
:repeat_second: zero
:experiment:
:trigger_args: "30 * * * * * *"
:data:
:repeat_second: thirty
In the log, I only see "Experiment fired at thirty second mark." Why isn''t
the first entry for exp...
2008 Apr 02
2
scheduling worker methods in rails
...y to schedule some worker methods within rails 2.0.2. The
problem is, both methods don''t even get called by BackgrounDRb.
my background.yml:
> ---
> :backgroundrb:
> :port: 11006
> :ip: 0.0.0.0
> ---
> :schedules:
> :server_worker:
> :update:
> :trigger_args: 1 * * * * * *
> :monitoring_worker:
> :check_services:
> :trigger_args: */10 * * * * * *
Both Worker gets automatically started if BackgroundRb starts. I want the
server_worker to start an update-method every minute, the monitoring_worker to
check every 10 seconds if the ser...
2008 Jan 30
6
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 rang...
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_w...
2006 Dec 11
1
scheduled only called once
when working with the scheduler i found that using
:trigger_args: 0 * * * * * *
in config/backgroundrb_schedules.yml the worker gets only called once.
:trigger_args: "0 * * * * * *" works as expected.
Maybe this should be changed in the README ?
regards tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http:...
2008 Feb 02
6
Suspended start of task not suspended
Hi
I thought this should suspend the task by 1 minute, but it starts
immediately:
MiddleMan.ask_work( :worker => :bar_worker, :worker_method
=> :test_method, :trigger_args => { :start => (Time.now + 1.minute)})
Is the start argument not allowed in the new backgroundrb (mine is at
rev HEAD (=314))? What can I do about this?
I really need to suspend starting the task as I want the client to
start the trigger but the task itself should wait till about midni...
2006 Nov 20
2
schedule support on latest svn, a question
I''m running the latest backgroundrb mainly for scheduled 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 d...
2008 Jan 31
2
cron scheduling problem
I''m running a fresh checkout of release 1.0.1 ...
It''s now 11:32 am local time on January 31.
I''ve configured a single worker for a test.
If I use the following schedule in my background.yaml file:
:schedules:
:debugger_worker:
:ping:
:trigger_args: 0 35 11 * * * *
Backgroundrb starts up without error.
If I make the following change:
:trigger_args: 0 30 11 * * * *
Backgroundrb complains:
brb-test/vendor/plugins/backgroundrb/server/cron_trigger.rb:161:in
`local'': argument out of range (ArgumentError)...
2007 Dec 30
3
A newbie question regarding BackgroundRb
...yml looks like
=======
---
port: "22222"
timer_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...
2007 Feb 18
2
backgroundrb launches concurrent instances of same job
...It
seems like it should wait until the job is finished before launching 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
2007 May 15
4
Need help with singleton worker
...shouldn''t call self.delete here, as we reuse the worker..?
end
end
MyWorker.register
script/console:
>> MiddleMan.schedule_worker(:class => :my_worker, :job_key => :foo,
:worker_method => :do_work, :worker_method_args => "a", :args =>
"_a_", :trigger_args => { :start => Time.now })
=> 0
>> MiddleMan.schedule_worker(:class => :my_worker, :job_key => :foo,
:worker_method => :do_work, :worker_method_args => "b", :args =>
"_b_", :trigger_args => { :start => Time.now })
=> 1
>> MiddleMan.s...
2007 May 22
4
Recommendations for eternally-running backgroundrb workers?
I''ve got some workers that I want to have running all the time. Right
now I''m just launching them manually, by requesting a special page in
my rails app that includes lines like:
MiddleMan.new_worker(:class=> :receiver, :job_key=>:r,
:args=>{:sleep_time=>10})
This strikes me as a really weak way to fire up my workers. I
basically want to automate things so
2007 Mar 05
2
Scheduled workers only run once unless you call self.delete inside the worker
I had a worker scheduled to run every minute with
backgroundrb_schedules.yml:
ebay_runner:
:class: :ebay_auction_worker
:job_key: :ebay_auction_runner
:trigger_type: :cron_trigger
:trigger_args: 0 * * * * * *
This worker posts an auction to eBay from a queue of auctions every minute.
I was having a problem where the worker would run ok the first time, but
never any subsequent minutes after that. The way I fixed it was adding a
call to self.delete at the end of every do_work() method:
-...
2008 May 03
2
backgroundrb / actionmailer / sendmail
...mail''
body ''body of email''
content_type "text/plain"
end
end
backgroundrb 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.def...
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 %>
:...
2008 Jul 22
1
More data in schedule
Hello!
How can I put more data in backgroundrb.yml, if I can?
Like that
:schedules:
:expressz_worker:
:sendexp:
:trigger_args: */30 * * * * *
:data: data1, data2
Thanks a lot!
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080722/64995aa4/attachment.html>
2008 Jan 26
1
thanks, and a question about week day scheduling
...;'m a big "fan" of BackgroundRB ... 1.0 came along just when my project
needed it, and I''ve been very happy. Thanks much for this very helpful
piece of software.
My question: I have a worker scheduled cron-style as follows:
:notification_worker:
:notify:
:trigger_args: 0 0 8 * * 1,3,5 *
I.e., I want to run this particular worker method at 8:00a on
Monday/Wednesday/Friday.
According to the logs, however, this worker ran at 8:00a this morning,
which happens to be Saturday! I have checked the system date, and it is
correct.
Am I misinterpreting the we...
2007 Dec 17
11
BackgrounDRb release 1.0 available now
...s of your worker. Just because
you are doing some processing won''t mean that your worker will
block. It can still receive requests from rails.
- Now, you can schedule multiple methods with their own triggers.
| :schedules:
| :foo_worker:
| :foobar:
| :trigger_args: */5 * * * * * *
| :data: Hello World
| :barbar:
| :trigger_args: */10 * * * * * *
- Inside each worker, you can start tcp server or connect to a
external server. Two important methods available in all workers are:
start_server("localhost",port,ModuleName)...
2006 Oct 30
11
BackgrounDRb 0.2.0 Release! Complete rewrite.
...rigger'' types. A simple
''trigger'' is specified with start, stop and interval:
require ''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 => :sche...