Hi all, I''m developing on windows, and I need to do task scheduling. BackgrounDRB seems to be the right solution, but it doesn''t work for windows... The question is: what''s your suggestion for any BackgrounDRB alternative under windows? Thanks in Advance Stefano -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Stefano, Stefano Bonomi wrote:> I''m developing on windows, and I need > to do task scheduling. > > BackgrounDRB seems to be the right solution, > but it doesn''t work for windows...The new version doesn''t work for Windows, but the original version does. It may suit your needs. OTOH, ''task scheduling'' makes me think of cron first, not BackgrounDRb. BackgrounDRb is typically used for offloading long running tasks. HTH, Bill --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Bill Walton wrote:> Hi Stefano, > > Stefano Bonomi wrote: > >> I''m developing on windows, and I need >> to do task scheduling. >> >> BackgrounDRB seems to be the right solution, >> but it doesn''t work for windows... > > The new version doesn''t work for Windows, but the original version does. > It > may suit your needs. OTOH, ''task scheduling'' makes me think of cron > first, > not BackgrounDRb. BackgrounDRb is typically used for offloading long > running tasks. > > HTH, > BillMany thanks Bill, I''ll investigate both CRON (hopefully it work for windows) and the original version of BackgrounDRb as you suggest. Greetings Stefano -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On May 28, 2008, at 5:41 AM, Stefano Bonomi wrote:> I''ll investigate both CRON (hopefully it work for windows) and the > original version of BackgrounDRb as you suggest. > > Greetings > > StefanoNope. Cron is a *nix tool too. Look into AT, which is the Windows version of cron. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Steve Ross wrote:> On May 28, 2008, at 5:41 AM, Stefano Bonomi wrote: > >> I''ll investigate both CRON (hopefully it work for windows) and the >> original version of BackgrounDRb as you suggest. >> >> Greetings >> >> Stefano > > Nope. Cron is a *nix tool too. Look into AT, which is the Windows > version of cron.Right Steve, CRON has nothing to do with Windows. Actually I am not able to find something about AT on Internet, can you point me in the right direction? (perhaps with a link) Thanks Stefano -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On May 29, 2008, at 3:25 AM, Stefano Bonomi wrote:> > Steve Ross wrote: >> On May 28, 2008, at 5:41 AM, Stefano Bonomi wrote: >> >>> I''ll investigate both CRON (hopefully it work for windows) and the >>> original version of BackgrounDRb as you suggest. >>> >>> Greetings >>> >>> Stefano >> >> Nope. Cron is a *nix tool too. Look into AT, which is the Windows >> version of cron. > > Right Steve, > > CRON has nothing to do with Windows. Actually I am not able to find > something about AT on Internet, can you point me in the right > direction? > (perhaps with a link) > > Thanks > > Stefano > --I''m not using Windows, but you might look into: http://www.microsoft.com/technet/scriptcenter/guide/sas_man_lpja.mspx?mfr=true Also see: http://www.kalab.com/freeware/cron/cron.htm http://cronw.sourceforge.net/ http://surguy.net/articles/icron.xml Although YMMV. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Steve Ross wrote:> On May 29, 2008, at 3:25 AM, Stefano Bonomi wrote: > >>> >> Thanks >> >> Stefano >> -- > > I''m not using Windows, but you might look into: > > http://www.microsoft.com/technet/scriptcenter/guide/sas_man_lpja.mspx?mfr=true > > Also see: > > http://www.kalab.com/freeware/cron/cron.htm > http://cronw.sourceforge.net/ > http://surguy.net/articles/icron.xml > > Although YMMV.Hi Steve, well, like you suggest I''ve just tried out Windows Task Scheduler to run my script. This is what I actually need. Thanks a lot for your suggestions. Stefano -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I have installed the latest backgrouDrb plugin in my rails application. I have scheduled a task in the backgroundrb.yml, but nothing seems to happen, when i start the backgroundrb server. I am running Mac OS X 10.5.2. I see no errors or anything. Logs shows that the workers class is started, but then worker method is never invoked as scheduled. Here is my backgroundrb.yml file: :backgroundrb: :ip: 0.0.0.0 :port: 11006 :schedules: :appointment_mailer: :nightly_mails: :trigger_args: :start: <%= Time.now + 5.seconds %> :end: <%= Time.now + 10.minutes %> :repeat_interval: <%= 1.minute %> And the worker class is: class AppointmentMailerWorker < BackgrounDRb::MetaWorker set_worker_name :appointment_mailer_worker def create(args = nil) # this method is called, when worker is loaded for the first time end def nightly_mails() logger.info "HELOO WORLD" end end Please help me to know what the problem could be. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You missed the _worker part of the worker name in the schedule. set_worker_name :appointment_mailer_worker So you need this: :schedules: :appointment_mailer_worker: :nightly_mails: ... On 25 Jun., 08:42, Dipesh Batheja <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I have installed the latest backgrouDrb plugin in my rails application. > I have scheduled a task in the backgroundrb.yml, but nothing seems to > happen, when i start the backgroundrb server. I am running Mac OS X > 10.5.2. I see no errors or anything. Logs shows that the workers class > is started, but then worker method is never invoked as scheduled. > > Here is my backgroundrb.yml file: > :backgroundrb: > :ip: 0.0.0.0 > :port: 11006 > > :schedules: > :appointment_mailer: > :nightly_mails: > :trigger_args: > :start: <%= Time.now + 5.seconds %> > :end: <%= Time.now + 10.minutes %> > :repeat_interval: <%= 1.minute %> > > And the worker class is: > class AppointmentMailerWorker < BackgrounDRb::MetaWorker > set_worker_name :appointment_mailer_worker > def create(args = nil) > # this method is called, when worker is loaded for the first time > end > > def nightly_mails() > logger.info "HELOO WORLD" > end > > end > > Please help me to know what the problem could be. > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
That doesn''t helped either. I added some logging in create method of the worker class. While starting, backgroundrb, i can see the effect in the drb''s log file. But that schedule thing doesn''t seem to work. Does anybody have some tested steps to make a schedule work. Can there be some issue with Mac OS 10.5 ? Sebastian Staudt wrote:> You missed the _worker part of the worker name in the schedule. > > set_worker_name :appointment_mailer_worker > > So you need this: > :schedules: > :appointment_mailer_worker: > :nightly_mails: > ... > > On 25 Jun., 08:42, Dipesh Batheja <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Wed, Jun 25, 2008 at 5:44 PM, Dipesh Batheja <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > That doesn''t helped either. I added some logging in create method of the > worker class. While starting, backgroundrb, i can see the effect in the > drb''s log file. But that schedule thing doesn''t seem to work. Does > anybody have some tested steps to make a schedule work. Can there be > some issue with Mac OS 10.5 ? >Get the latest version from Git as outlined in backgroundrb.rubyforge.org. Also, is your create method returning, or is it stuck somewhere? Can i see your actual worker code that you are running? If create method is working, then you could have messed with config file or create method is not returning at all. Either ways, paste your actual worker code. Also, use pastie or something to paste code since, gmail screws up code formatting. -- Let them talk of their oriental summer climes of everlasting conservatories; give me the privilege of making my own summer with my own coals. http://gnufied.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Well, I dergaded back to the version 1.01. Now my worker runs if i hard code the schedule in backgroundrb.yml . But it does nothing if a create new worker in the Rails controller with same schedule. Here is action which i run to invoke the worker: def appointments_summery MiddleMan.new_worker(:worker => :appointment_reminder_worker, :job_key => :hello_world, :data => "wow_man", :schedule => { :appointments_summery => { :trigger_args => "*/5 * * * * * *",:data => "hello_world" }}) render :text => "worker starterd" end Worker code is pretty simple, it just logs some text: def appointments_summery(args = nil) logger.info "HELLOOWOWO: #{args}" end Everything other method to start workers, are working fine, through backgroundrb.yml, MiddleMan.send_request, MiddleMan.ask_work. Only the MiddleMan.new_worker doesn''t respond. I will try to get the latest release from GIT and see if it works. By the way, there is "---" right at the top of autogenerated backgroundrb.yml. Is that important? Thanks for the help On Jun 25, 10:42 pm, hemant <gethem...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Wed, Jun 25, 2008 at 5:44 PM, Dipesh Batheja > > <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > That doesn''t helped either. I added some logging in create method of the > > worker class. While starting, backgroundrb, i can see the effect in the > > drb''s log file. But that schedule thing doesn''t seem to work. Does > > anybody have some tested steps to make a schedule work. Can there be > > some issue with Mac OS 10.5 ? > > Get the latest version from Git as outlined in > backgroundrb.rubyforge.org. Also, is your create method returning, or > is it stuck somewhere? Can i see your actual worker code that you are > running? If create method is working, then you could have messed with > config file or create method is not returning at all. Either ways, > paste your actual worker code. > > Also, use pastie or something to paste code since, gmail screws up > code formatting. > > -- > Let them talk of their oriental summer climes of everlasting > conservatories; give me the privilege of making my own summer with my > own coals. > > http://gnufied.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
By the way, i installed it as a plugin in Rails, rather then as a gem. Could that cause some issue? On Jun 26, 10:37 pm, dipesh_batheja <DipeshBath...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Well, I dergaded back to the version 1.01. Now my worker runs if i > hard code the schedule in backgroundrb.yml . But it does nothing if a > create new worker in the Rails controller with same schedule. > Here is action which i run to invoke the worker: > > def appointments_summery > MiddleMan.new_worker(:worker > => :appointment_reminder_worker, :job_key => :hello_world, :data => > "wow_man", :schedule => { :appointments_summery => { :trigger_args => > "*/5 * * * * * *",:data => "hello_world" }}) > render :text => "worker starterd" > end > > Worker code is pretty simple, it just logs some text: > def appointments_summery(args = nil) > logger.info "HELLOOWOWO: #{args}" > end > > Everything other method to start workers, are working fine, through > backgroundrb.yml, MiddleMan.send_request, MiddleMan.ask_work. Only the > MiddleMan.new_worker doesn''t respond. > > I will try to get the latest release from GIT and see if it works. By > the way, there is "---" right at the top of autogenerated > backgroundrb.yml. Is that important? > > Thanks for the help > > On Jun 25, 10:42 pm, hemant <gethem...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On Wed, Jun 25, 2008 at 5:44 PM, Dipesh Batheja > > > <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > > That doesn''t helped either. I added some logging in create method of the > > > worker class. While starting, backgroundrb, i can see the effect in the > > > drb''s log file. But that schedule thing doesn''t seem to work. Does > > > anybody have some tested steps to make a schedule work. Can there be > > > some issue with Mac OS 10.5 ? > > > Get the latest version from Git as outlined in > > backgroundrb.rubyforge.org. Also, is your create method returning, or > > is it stuck somewhere? Can i see your actual worker code that you are > > running? If create method is working, then you could have messed with > > config file or create method is not returning at all. Either ways, > > paste your actual worker code. > > > Also, use pastie or something to paste code since, gmail screws up > > code formatting. > > > -- > > Let them talk of their oriental summer climes of everlasting > > conservatories; give me the privilege of making my own summer with my > > own coals. > > >http://gnufied.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I checked the status of my the worker i created using worker_info function. Its shows status as stopped. Do i need to explicitly do something after i start a new worker using MiddleMan.new_worker. On Jun 26, 11:09 pm, dipesh_batheja <DipeshBath...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> By the way, i installed it as a plugin in Rails, rather then as a gem. > Could that cause some issue? > > On Jun 26, 10:37 pm, dipesh_batheja <DipeshBath...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Well, I dergaded back to the version 1.01. Now my worker runs if i > > hard code the schedule in backgroundrb.yml . But it does nothing if a > > create new worker in the Rails controller with same schedule. > > Here is action which i run to invoke the worker: > > > def appointments_summery > > MiddleMan.new_worker(:worker > > => :appointment_reminder_worker, :job_key => :hello_world, :data => > > "wow_man", :schedule => { :appointments_summery => { :trigger_args => > > "*/5 * * * * * *",:data => "hello_world" }}) > > render :text => "worker starterd" > > end > > > Worker code is pretty simple, it just logs some text: > > def appointments_summery(args = nil) > > logger.info "HELLOOWOWO: #{args}" > > end > > > Everything other method to start workers, are working fine, through > > backgroundrb.yml, MiddleMan.send_request, MiddleMan.ask_work. Only the > > MiddleMan.new_worker doesn''t respond. > > > I will try to get the latest release from GIT and see if it works. By > > the way, there is "---" right at the top of autogenerated > > backgroundrb.yml. Is that important? > > > Thanks for the help > > > On Jun 25, 10:42 pm, hemant <gethem...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > On Wed, Jun 25, 2008 at 5:44 PM, Dipesh Batheja > > > > <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > > > That doesn''t helped either. I added some logging in create method of the > > > > worker class. While starting, backgroundrb, i can see the effect in the > > > > drb''s log file. But that schedule thing doesn''t seem to work. Does > > > > anybody have some tested steps to make a schedule work. Can there be > > > > some issue with Mac OS 10.5 ? > > > > Get the latest version from Git as outlined in > > > backgroundrb.rubyforge.org. Also, is your create method returning, or > > > is it stuck somewhere? Can i see your actual worker code that you are > > > running? If create method is working, then you could have messed with > > > config file or create method is not returning at all. Either ways, > > > paste your actual worker code. > > > > Also, use pastie or something to paste code since, gmail screws up > > > code formatting. > > > > -- > > > Let them talk of their oriental summer climes of everlasting > > > conservatories; give me the privilege of making my own summer with my > > > own coals. > > > >http://gnufied.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---