Calling an external program from a batch file;
this program may either run successfully or fail;
if it succeeds, it will probably return to the original batch file in about 2 seconds and continue with the next command;
if it fails, it will take more than 10 seconds to return to the original batch file;
since this is executed in a loop, the execution efficiency becomes very low;
I want to know how to forcibly terminate a program that failed to execute, and directly execute the command below;
that is, only allow the program 3 seconds to run;
if it succeeds, then it will definitely succeed within 3 seconds; and the command below will also be executed;
if it fails, then as soon as 3 seconds are up it will forcibly terminate itself and go execute the command below; I don't know whether this can be done;
Can a batch file execute in parallel?
For example
Can it be made to do this
[ Last edited by bjsh on 2007-3-24 at 02:15 PM ]
this program may either run successfully or fail;
if it succeeds, it will probably return to the original batch file in about 2 seconds and continue with the next command;
if it fails, it will take more than 10 seconds to return to the original batch file;
since this is executed in a loop, the execution efficiency becomes very low;
I want to know how to forcibly terminate a program that failed to execute, and directly execute the command below;
that is, only allow the program 3 seconds to run;
if it succeeds, then it will definitely succeed within 3 seconds; and the command below will also be executed;
if it fails, then as soon as 3 seconds are up it will forcibly terminate itself and go execute the command below; I don't know whether this can be done;
Can a batch file execute in parallel?
For example
batch file
|
|
program
|
|
program
|
|
program
|
.
.
.
Can it be made to do this
batch file
|
|
--------------------------------------
| | | | | | | | .....
| | | | | | | |
program program program program program program program program
[ Last edited by bjsh on 2007-3-24 at 02:15 PM ]

