Hello all, I have to write a cron_job and have to access a remote database in that cron job. How can I do it? Any tutorials or can anyone please guide me. -- Regards Haris Gulzar --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Sorry I forgot to mention, the remote database is MySQL. On Feb 7, 2008 12:39 PM, Haris Gulzar <harisgulzar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello all, > > I have to write a cron_job and have to access a remote database in that > cron job. How can I do it? Any tutorials or can anyone please guide me. > > -- > Regards > > Haris Gulzar-- Regards Haris Gulzar --~--~---------~--~----~------------~-------~--~----~ 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 can call a method in a model by ''running script/runner "Model.method"''. Matt Hall has some good information about running a controller with script/runner, http://matthall.wordpress.com/2006/12/06/how-to-execute-a-rails-controller-action-via-cron/ Best of luck, Aaron On Feb 7, 2:44 am, "Haris Gulzar" <harisgul...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Sorry I forgot to mention, the remote database is MySQL. > > On Feb 7, 2008 12:39 PM, Haris Gulzar <harisgul...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hello all, > > > I have to write a cron_job and have to access a remote database in that > > cron job. How can I do it? Any tutorials or can anyone please guide me. > > > -- > > Regards > > > Haris Gulzar > > -- > Regards > > Haris Gulzar--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---