LPM: Using sleep()

Gregg Casillo gcasillo at ket.org
Tue Dec 14 12:10:18 CST 1999


I have a script I want to run every 30 minutes or so. On a *nix box, I'd
add a line to my crontab to do this. No problem, except I'm working with
an NT box. From my limited knowledge of NT, there is no equivalent of
cron native to NT. To make a long story shorter, I tried Wincron and
another DOS cron utility with no success.

Is there anything wrong with doing the following:

while (sleep 1800) {
  ...
  yaddy-yaddy-yaddah
  ...
}

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

Thanks,
Gregg Casillo
gcasillo at ket.org





More information about the Lexington-pm mailing list