Forum Home
Press F1
 
Thread ID: 106774 2010-01-22 07:34:00 Alternative to SLEEP command in Windows 2008? Mike (15) Press F1
Post ID Timestamp Content User
850907 2010-01-22 07:34:00 Hi :)

In Windows 2000 and/or 2003 there was a command 'SLEEP' that could be used in a batch file to pause between commands
netsvc "My Service 1" \\myserver /start
sleep 5
netsvc "My Service 2" \\myserver /start
sleep 5
netsvc "My Service 3" \\myserver /start But in Windows 2008 the SLEEP command is gone. Has it been replaced by something? Or do I need to do something like
sc \\myserver start "My Service 1"
ping -w 5000 -n 1 1.0.0.1
sc \\myserver start "My Service 2"
ping -w 5000 -n 1 1.0.0.1
sc \\myserver start "My Service 3"
ping -w 5000 -n 1 1.0.0.1 to get it to do the same thing?

Cheers,
Mike.
Mike (15)
850908 2010-01-23 02:11:00 'timeout' seems to be what you are looking for. linw (53)
850909 2010-01-23 02:40:00 'timeout' seems to be what you are looking for.
:D perfect - exactly what I was after!

Thanks heaps linw :)

Mike.
Mike (15)
1