LPM: Using sleep()

David Hempy hempy at ket.org
Tue Dec 14 13:38:48 CST 1999


At 01:10 PM 12/14/1999 -0500, you wrote:
>I have a script I want to run every 30 minutes or so. 

One way to hack this functionality into NT is to use the SOON command.  It
basically says, "Run some command in X seconds".  It is essentially an
interface to AT.  

You can end your program with a SOON command to run it again in a little
while.  As long as the chain runs unbroken, you're in luck.  This of course
is a problem if your program doesn't complete or any number of other
issues.  I'm frankly not a fan of this approach.

>Does the sleep() routine have a lot of overhead or use a lot of CPU
>cycles? Any better ideas?

Sleep is quite lean on the CPU.  If your program sits on a big pile of
memory, this could be an issue, even with paging.

-d


--
David Hempy
Internet Database Administrator
Kentucky Educational Television




More information about the Lexington-pm mailing list