Forum: Ruby on Rails make a method in a controller do something by console script

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
klaas debeuf (Guest)
on 2006-02-28 15:22
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


Mathias Stjernström (Guest)
on 2006-02-28 16:52
(Received via mailing list)
You could use the runner script to execute your method(s).

For example:

ruby script/runner -e production ''

Where 'Import' is the model and 'run' is the method.

Put it in crontab and you are good to go!

Mathias Stjernstrom
This topic is locked and can not be replied to.