From: MenTaLguY Date: 2009-05-26T05:48:24+09:00 Subject: Re: Runnin code at a certain time? On Tue, 2009-05-26 at 05:36 +0900, Caleb Clausen wrote: > > I am new to ruby and I am attempting to run some code at a certain > > time. The Ruby Time class is very interesting, you can add time, and do > > all of these amazing things but i cannot find a way to run code at a > > certain time. I feel like I'm missing something. So far all I have is: > > > > sleep(1) while Time.now < ("Time") > > > > How would I link some code to be run to this? Or is there an easier way? You might want to try my Scheduler gem. Scheduler.at_time(time_in_seconds_from_epoch) do # ... stuff to do ... end -mental