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
Martin Scheffler 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? -- Konst.Kolomeetz
>Why don''t you want to execute them w/ smth like cron?This is for cleaning up data inconsistencies that emerge when the server has to be restarted. In normal operation these errors won''t come up, so a cron job would just waste cpu time. ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
On 27 Nov 2005, at 19:49, Martin Scheffler wrote:>> Why don''t you want to execute them w/ smth like cron? > > This is for cleaning up data inconsistencies that emerge when the > server has to be restarted. In normal operation these errors won''t > come up, so a cron job would just waste cpu time.Create a wrapper script to clean up the data and then launch the server? Yours, Craig -- Craig Webster | t: +44 (0)131 516 8595 | e: craig-07VhxHapISisTnJN9+BGXg@public.gmane.org Xeriom.NET | f: +44 (0)709 287 1902 | w: http://xeriom.net