Periodic Events

Hi all,

Noob question, so please bear with me.

I want my rails app to periodically do some maintenance work (e.g.
once a day). The maintenance commands can be called by an action under
a maintenance controller.

A friend suggested using crontab, but I’m not sure how to use crontab
to call an action in rails.

Thanks in advance!

– Andrew

On 8/6/07, Andrew F. [email protected] wrote:

to call an action in rails.
Use a runner script which loads up the rails environment for you.
Create a class file and put it in the lib directory. Then you can
call class methods in the file by running:

ruby script/runner “Myclass.mymethod”

Chris