Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

WScript.Sleep doesn't work with VBScript in Services

$
0
0

I have the following command as the last line in my script:

WScript.Sleep(300000)

It works fine if I execute the script by having its folder up in Windows Explorer and I double click on the script.

However, when the script runs via Services, the sleep command doesn't work. The script just keeps running continuously. I want it to "wake up" every 5 minutes and check if a process has stopped running, then send an email if so. It's sending the email once or twice a minute.

Thanks.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>