I''ve (currently) got some code, in it''s own action in a controller. It fetches email from imap and does all kinds of mojo with it. What I need to do is have this run via a cronjob every so and so many minutes. Now, currently, to run it I have to load http://url/controller/action for that action. I want to run this silently in the backround on the server running the app, so that things will seem automatically. I am considering running curl or wget in a cronjob, but are there any ways of doing this that are less caveman-ish? -- 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 -~----------~----~----~----~------~----~------~--~---
You''ll need BackgrounDRb. If you''re german, i have written an article in my Blog just about that... http://siebert-wd.de/articles/2006/08/16/regelmaessige-aufgaben-mit-backgroundrb-erledigen 2006/8/24, Stian Hole <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > > I''ve (currently) got some code, in it''s own action in a controller. It > fetches email from imap and does all kinds of mojo with it. What I need > to do is have this run via a cronjob every so and so many minutes. Now, > currently, to run it I have to load http://url/controller/action for > that action. I want to run this silently in the backround on the server > running the app, so that things will seem automatically. > > I am considering running curl or wget in a cronjob, but are there any > ways of doing this that are less caveman-ish? > > -- > Posted via http://www.ruby-forum.com/. > > > >-- Michael Siebert <info-norLuBQQNv0t+8dGM1inlw@public.gmane.org> www.siebert-wd.de - Gedanken lesen www.stellar-legends.de - Weltraum-Browsergame im Alpha-Stadium --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
franco.fallica-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Aug-24 08:41 UTC
[Rails] Re: Cronjob for controller/action
Thats what you want: http://wiki.rubyonrails.com/rails/pages/RunnerScript --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
scripts/runner -- runner in the scripts directory is designed for recreating the rails environment to run rails code from a cron job, using all of your actions and etc. It has documentation in the usual places. ........................................................................ .......... John Browning On 24 Aug 2006, at 08:24, Stian Hole wrote:> > I''ve (currently) got some code, in it''s own action in a controller. It > fetches email from imap and does all kinds of mojo with it. What I > need > to do is have this run via a cronjob every so and so many minutes. > Now, > currently, to run it I have to load http://url/controller/action for > that action. I want to run this silently in the backround on the > server > running the app, so that things will seem automatically. > > I am considering running curl or wget in a cronjob, but are there any > ways of doing this that are less caveman-ish? > > -- > 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 -~----------~----~----~----~------~----~------~--~---