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.