Hi I''m using passenger + apache. with this combination, how can I start my ruby script on server''s reboot? now I type "ruby myscript.rb run" whenever server reboot.
On Tue, Jun 23, 2009 at 4:47 PM, serenobs <serenobs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> how can I start my ruby script on server''s reboot?Like anything else -- invoke it from a script in /etc/init.d . (That is, of course, assuming *nix -- Windows, no idea) -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
you can add your script to the cron tab take a look at this screencast http://railscasts.com/episodes/164-cron-in-ruby thanks Rajesh www.rajeshpg.com On Wed, Jun 24, 2009 at 5:17 AM, serenobs <serenobs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi > > I''m using passenger + apache. > with this combination, how can I start my ruby script on server''s > reboot? > now I type "ruby myscript.rb run" whenever server reboot. > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Most modern crontab specifications support a @reboot meta-schedule. A job tagged @reboot /usr/bin/ruby /path/to/your/script.rb run would run whenever the machine restarted. On Jun 23, 7:47 pm, serenobs <seren...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi > > I''m using passenger + apache. > with this combination, how can I start my ruby script on server''s > reboot? > now I type "ruby myscript.rb run" whenever server reboot.