How to tell server to do <something> once ? or schedule thi


#1

Hi,

I have some initialisation need to be done only when
the server starts. And I don’t know where should I
pull those codes, should I pull them into some special
controller, or some place else…

Also if I want to schedule some task with rails, it is
possible???

Thanks you very much???

Saiho

The mind is its own place, and in itself.
Can make a Heaven of Hell, a Hell of Heaven.

http://www.geocities.com/sayoyo/


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


#2

Code in environment.rb is run once only (I presume but quite sure)

For scheduling have a look here : http://www.ruby-forum.com/topic/59283