Jump to content

Recommended Posts

Posted (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 by Gouki

Posted

You could pause it using the crude, ping command:

ping -n 181 127.0.0.1>nul

adding 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 OFF
SET SECONDS=0
SET MINUTES=3
IF %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.VBS
cscript/nologo TEMP.VBS
DEL TEMP.VBS
ECHO/ Continuing...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...