commands a 30 minute time pause

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
facescreen
Posts: 7
Joined: 15 Oct 2014 23:49
Location: italy
Contact:

commands a 30 minute time pause

#1 Post by facescreen » 20 Oct 2014 15:12

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

Squashman
Expert
Posts: 4471
Joined: 23 Dec 2011 13:59

Re: commands a 30 minute time pause

#2 Post by Squashman » 20 Oct 2014 15:45

Windows Vista and above have the TIMEOUT command.

Yury
Posts: 115
Joined: 28 Dec 2013 07:54

Re: commands a 30 minute time pause

#3 Post by Yury » 20 Oct 2014 15:47

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

facescreen
Posts: 7
Joined: 15 Oct 2014 23:49
Location: italy
Contact:

Re: commands a 30 minute time pause

#4 Post by facescreen » 20 Oct 2014 23:22

good solution but there is a thing that works in all even with windows xp?

facescreen
Posts: 7
Joined: 15 Oct 2014 23:49
Location: italy
Contact:

CALL WAIT 300

#5 Post by facescreen » 20 Oct 2014 23:35

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

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: commands a 30 minute time pause

#6 Post by foxidrive » 20 Oct 2014 23:40

This is an alternative:

Code: Select all

ping -n 1800 localhost  >nul

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: CALL WAIT 300

#7 Post by foxidrive » 20 Oct 2014 23:42

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.

Squashman
Expert
Posts: 4471
Joined: 23 Dec 2011 13:59

Re: CALL WAIT 300

#8 Post by Squashman » 21 Oct 2014 06:11

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.

Samir
Posts: 384
Joined: 16 Jul 2013 12:00
Location: HSV
Contact:

Re: commands a 30 minute time pause

#9 Post by Samir » 21 Oct 2014 21:44

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.

Post Reply