in reply to WinDoze NT Automation Question
You could wrap the main part of the script in an
infinite loop with a call to sleep.
Set sleep to an appropriate interval of seconds i.e.
3600 (for one hour). Then run the program. It will execute
the main code once every hour.
If you want to simulate a cron
and have it run everyday at 2:00PM, you would just set the
sleep timer to 86400 (24*60*60) and first execute the program at 2:00pm today.
while(1) {
#execute some code here....
sleep 86400 #Run code once every 24 hours.
}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: WinDoze NT Automation Question
by Sprad (Hermit) on Apr 25, 2001 at 02:07 UTC | |
by $code or die (Deacon) on Apr 25, 2001 at 02:57 UTC | |
by LordAvatar (Acolyte) on Apr 25, 2001 at 08:13 UTC |