1.

Solve : SLEEP Alternative in Windows Batch Files??

Answer»

I'd like to put a 30-second wait in a Windows batch file. It seems that I USED to be able to do this with SLEEP but the option isn't available anymore in W2K/XP. Does anybody have any suggestions that doesn't involve user input? I need to add a delay before I bounce a service.Use "The poor man's timer".

ping 1.1.1.1 -n 10 -w 1000 >%tmp%null

This example would be a 10 second delay. Change the 10 to the desired NUMBER of second and insert the line at the point you want the delay.Thanks - I'll GIVE that a try. Is it better to put it in the ORIGINAL bat file or a separate bat file and call it?If you have need for it in more than ONE batch file, a seperate file and call. If only needed in this one, insert at the proper place.



Discussion

No Comment Found