From: ara.t.howard@... Date: 2006-12-02T04:40:10+09:00 Subject: Re: Timers, scheduling and Ruby On Sat, 2 Dec 2006, Lipper, Matthew wrote: > I'm still catching up to this thread but FWIW I am always interested in > making Runt more useful and functional. If I understand the above correctly, > then you'd like a next_time method returning a Date/DateTime/Time (or > whatever) that indicates the next occurrence of this expression? here's what i'd like inclusive_endpoint = Time.now + 7.days runt.next_times inclusive_endpoint #=> array of all times covered between # now and endpoint, 'now' should be an # optional parameter so multiple calls # can be made transactional, eg # # runt.next_times inclusive_endpoint, 'now' => Time.now # runt.next_times inclusive_endpoint, :now => Time.now # that way it's easy to do loop{ now = Time.now inclusive_endpoint = now + sleep_interval runts.each do |runt| times = runt.next_times inclusive_endpoint, :now => now schedule_all_events times end sleep_until inclusive_endpoint } make sense? thanks for a great lib btw! -a -- if you want others to be happy, practice compassion. if you want to be happy, practice compassion. -- the dalai lama