Gouki Posted August 4, 2005 Share Posted August 4, 2005 (edited) Guys ... I need something that, when the .CMD file is executed, it stays "on pause" for 3 minutes.The last thing is...Does the restart command with timer supports 24h? (Dont know how many seconds)? Edited August 4, 2005 by Gouki Link to comment Share on other sites More sharing options...
what3v3r Posted August 4, 2005 Share Posted August 4, 2005 (edited) for pausing the batch file you can use sleep.exe. you can find it on http://unattended.msfn.org/global/downloads.htm Edited August 4, 2005 by what3v3r Link to comment Share on other sites More sharing options...
Gouki Posted August 4, 2005 Author Share Posted August 4, 2005 Thank you.What I want is the Start /wait syntax with some kind of timer. Not using any .EXE to do it. Link to comment Share on other sites More sharing options...
Yzöwl Posted August 4, 2005 Share Posted August 4, 2005 You could pause it using the crude, ping command:ping -n 181 127.0.0.1>nuladding 1 second to the time you require, (in seconds), appears to be more accurate.My preferred method would be using the 'built-in' timer function of WSH, here is a basic template, set for 3 minutes, run it in a cmd console to see it work:@ECHO OFFSET SECONDS=0SET MINUTES=3IF %SECONDS% EQU 1 (SET SECS=second) ELSE (SET SECS=seconds)IF %MINUTES% EQU 1 (SET MINS=minute) ELSE (SET MINS=minutes)ECHO/ Pausing for %MINUTES% %MINS% and %SECONDS% %SECS%...ECHO/Wscript.sleep 1000*%SECONDS%+60000*%MINUTES%>TEMP.VBScscript/nologo TEMP.VBSDEL TEMP.VBSECHO/ Continuing... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now