Page 1 of 1

commands a 30 minute time pause

Posted: 20 Oct 2014 15:12
by facescreen
prejudice to the case do you know if there is a way to start script in a bat file, commands a 30 minute time pause one from another ess:
3000 script time: 01
3000 script time: 02

Re: commands a 30 minute time pause

Posted: 20 Oct 2014 15:45
by Squashman
Windows Vista and above have the TIMEOUT command.

Re: commands a 30 minute time pause

Posted: 20 Oct 2014 15:47
by Yury

Code: Select all

TIMEOUT /?


TIMEOUT [/T] timeout [/NOBREAK]

Description:
This utility accepts a timeout parameter to wait for the specified
time period (in seconds) or until any key is pressed. It also
accepts a parameter to ignore the key press.

Parameter List:
/T timeout Specifies the number of seconds to wait.
Valid range is -1 to 99999 seconds.

/NOBREAK Ignore key presses and wait specified time.

/? Displays this help message.

NOTE: A timeout value of -1 means to wait indefinitely for a key press.

Examples:
TIMEOUT /?
TIMEOUT /T 10
TIMEOUT /T 300 /NOBREAK
TIMEOUT /T -1

Re: commands a 30 minute time pause

Posted: 20 Oct 2014 23:22
by facescreen
good solution but there is a thing that works in all even with windows xp?

CALL WAIT 300

Posted: 20 Oct 2014 23:35
by facescreen
I'm trying to run the scripts one after another but at intervals of 30 minutes, ess:
@echo off

start se.exe

start auto.exe

set year=2013

for /f "tokens=1,2 delims=.-/" %%i in ("%date%") do date %%i/%%j/%year%

CALL WAIT 300

set year=2014

for /f "tokens=1,2 delims=.-/" %%i in ("%date%") do date %%i/%%j/%year%

exit /b


but I do not know why if I use this command [300 CALL WAIT] I do not work anymore the bat file

Re: commands a 30 minute time pause

Posted: 20 Oct 2014 23:40
by foxidrive
This is an alternative:

Code: Select all

ping -n 1800 localhost  >nul

Re: CALL WAIT 300

Posted: 20 Oct 2014 23:42
by foxidrive
facescreen wrote:but I do not know why if I use this command [300 CALL WAIT] I do not work anymore the bat file



wait
is not a default Windows command.

Re: CALL WAIT 300

Posted: 21 Oct 2014 06:11
by Squashman
facescreen wrote:I'm trying to run the scripts one after another but at intervals of 30 minutes, ess:
@echo off

Then use Windows Task Scheduler.

Re: commands a 30 minute time pause

Posted: 21 Oct 2014 21:44
by Samir
I use the ping 127.0.0.1 to nul method as well as using the time variable to execute a batch at a certain time. I'm sure you could modify that method for a certain minute each hour.