Execute commands on rails startup?

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: WEB.DE - E-Mail-Adresse kostenlos, FreeMail, De-Mail & Nachrichten

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?