Uh...

while (true) do
	# your stuff here
	sleep(180)
end

> -----Original Message-----
> From: ara.t.howard / noaa.gov [mailto:ara.t.howard / noaa.gov]
> Sent: Tuesday, June 06, 2006 3:37 PM
> To: ruby-talk / ruby-lang.org
> Subject: Re: can I keep re-running the same script? how?
> 
> On Wed, 7 Jun 2006, Hunter Walker wrote:
> 
> > I want to run a particular script every 3 minutes.  I would do this
> > using crontab in Linux, but I am having trouble getting that to work.
> > The script works fine from the Windows or Linux command line, however.
> >
> > I thought it might be easier to add some code to the end of the script
> > that tells it to sleep for three mins and then start at the beginning.
> >
> > Any thoughts?  As always, I appreciate your help.
> >
> > -Hunter
> >
> > --
> > Posted via http://www.ruby-forum.com/.
> 
> 
> sleep 180
> exec ["ruby" + ARGV].join(' ')
> 
> -a
> --
> suffering increases your inner strength.  also, the wishing for suffering
> makes the suffering disappear.
> - h.h. the 14th dali lama
> 
> This e-mail message may contain privileged and/or confidential
> information, and is intended to be received only by persons entitled to
> receive such information. If you have received this e-mail in error,
> please notify the sender immediately. Please delete it and all attachments
> from any servers, hard drives or any other media. Other use of this e-mail
> by you is strictly prohibited.
> All e-mails and attachments sent and received are subject to monitoring,
> reading and archival by Seminis. The recipient of this e-mail is solely
> responsible for checking for the presence of "Viruses" or other "Malware".
> Seminis accepts no liability for any damage caused by any such code
> transmitted by or accompanying this e-mail or any attachment.