klaas debeuf
2006-Feb-28 13:22 UTC
[Rails] make a method in a controller do something by console script
is there a possibility to automate a method in a controller by a ruby script , i have written a method which is taking rssfeeds from other sites and puts it to my database , but i want to have this method called each 15 minutes , can you do it by a console script or do i have build a stand-alone program? can somebody put me on the correct track?or give me some hints greets Klaas -- Posted via http://www.ruby-forum.com/.
Mathias Stjernström
2006-Feb-28 14:51 UTC
[Rails] make a method in a controller do something by console script
Hi. You could use the runner script to execute your method(s). For example: ruby script/runner -e production ''Import.run()'' Where ''Import'' is the model and ''run'' is the method. Put it in crontab and you are good to go! -- Mathias Stjernstrom On Feb 28, 2006, at 2:22 PM, klaas debeuf wrote:> is there a possibility to automate a method in a controller by a ruby > script , > > i have written a method which is taking rssfeeds from other sites and > puts it to my database , but i want to have this method called each 15 > minutes , can you do it by a console script or do i have build a > stand-alone program? > can somebody put me on the correct track?or give me some hints > > greets > > Klaas > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails