Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SleepMethod in VB Script

Status
Not open for further replies.

RhythmAddict112

Programmer
Joined
Jun 17, 2004
Messages
625
Location
US
Hi. Im going to try to be as concise as possible - Okay. I have a .vbs that does checks a database every X minutes (using WScript.Sleep 100, see )

It gives one argument on the command line which is actually fed into the WHERE clause of the sql. If there are results, it mails them....If there are not, it does nothing, sleeps for X minutes and then repeats the process.

With me? Okay good. This all works no problem but it could be better. For one, this right now is an endless loop. Is there a way for me to gracefully exit the program once it running?
 
Maybe in your loop you may test the existence of a flag file (with fso) to determine if the script must continue or quit ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top