.bat file help

OutHouse

Lifer
Jun 5, 2000
36,410
616
126
i want to make a bat file that will stop and restart a service that will be called by a monitor program when it sees that the log file it is monitoring hasnt been updated.

i want to put a 15 second pause from when the net stop {service} is initiated to when the net start {service} is started.

what command do i use to put that pause?
 

OutHouse

Lifer
Jun 5, 2000
36,410
616
126
c:\netsvc.exe service \\server /stop
sleep 15
c:\netsvc.exe service \\server /start
c:\tools\SMTPMail -R %1 -M "server service has been restarted"