Re: how to set time limit to run command in batch file
- From: "Pegasus \(MVP\)" <I.can@xxxxxxx>
- Date: Tue, 11 Apr 2006 00:46:28 +1000
"Ray" <rayvu@xxxxxxxxx> wrote in message
news:OJTcGgIXGHA.3760@xxxxxxxxxxxxxxxxxxxxxxx
Hello,with
I have a batch file to download a list of web links regularly,
each of the the web resource is named by sequential number,
eg, 101.htm, 102.htm, 103.htm, etc.
So, I use a integer variable to record the current web file to be download
and combine them together to the command line.
However, it may occur unlimited waiting when one of the web resource is
unavailable.
So, I am looking for any utility to launch each of the download command
a specified time limit.
When the time limit is reached, end the current process automatically and
execute the next command.
here is a utility to run command with delay
http://www.rjlsoftware.com/software/utility/delayexec/
That's the way I am looking the function is run command with time limit.
If anyone have any good idea, please feel free and thank u to notice me.
Thanks all of you spending the time to see my post,
Thank you very much!
You could run this batch file. It will allocate about
one minute for the task defined in line 2.
@echo off
set app=download.exe
set limit=60
if not "%1"=="" goto Delay
start /B %0 x
%app% www.xxx.yyy.zzz 101.htm
start /B %0 x
%app% www.xxx.yyy.zzz 102.htm
start /B %0 x
%app% www.xxx.yyy.zzz 103.htm
goto :eof
========================
:Delay
ping localhost -n %limit% > nul
taskkill /im /f %app%
exit
.
- Follow-Ups:
- References:
- Prev by Date: Re: Copy files from computer to run on a X-Box
- Next by Date: Re: I have 2 users setup in XP
- Previous by thread: how to set time limit to run command in batch file
- Next by thread: Re: how to set time limit to run command in batch file
- Index(es):
Relevant Pages
|