Execute commands on rails startup?


#1

Hi,
I want to execute some cleanup sql statements ONCE when rails starts up.
Where can I put that? environment.rb?
Or will that be executed every time a new scgi or fcgi instance gets
started?

Thanks,
Martin


Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193


#2

Martin S. wrote:

I want to execute some cleanup sql statements ONCE when rails starts up.
Where can I put that? environment.rb?
Or will that be executed every time a new scgi or fcgi instance gets started?

Why don’t you want to execute them w/ smth like cron?