Readdy Write  
0,00 €
Your View Money
Views: Count
Self 20% 0
Your Content 60% 0

Users by Links 0
u1*(Content+Views) 10% 0
Follow-Follower 0
s2*(Income) 5% 0

Count
Followers 0
Login Register as User

Asynchronous call with .bat files

17.08.2018 (👁3045)


 

Task:

How to call multiple programs in a .bat file The programs should be processed in parallel.

 

Problem:

If you want to run tasks in a batch file .bat as a batch and want to run programs in one,

then, simply entering the executable .exe file will process them sequentially, just like a stack.

All programs are executed sequentially, as in a stack, which means that each program is only started when the previous program is finished and closed.

The problem then is that the stack stops when a program is not finished and hangs in a dialog.

 

 

Synchronous Batch:

As a synchronous process:

That is, each call waits until the previous program has expired.

If there is an error or error dialog, the execute queue stops.

C:\_Daten\_Robots\1\webrobot.exe

C:\_Daten\_Robots\2\webrobot.exe

C:\_Daten\_Robots\3\webrobot.exe

C:\_Daten\_Robots\4\webrobot.exe

C:\_Daten\_Robots\5\webrobot.exe

C:\_Daten\_Robots\6\webrobot.exe

C:\_Daten\_Robots\7\webrobot.exe

C:\_Daten\_Robots\8\webrobot.exe

C:\_Daten\_Robots\9\webrobot.exe

C:\_Daten\_Robots\10\webrobot.exe

C:\_Daten\_Robots\11\webrobot.exe

 

 

Solution:

Asynchronous

With an asynchronous call, all programs are called almost simultaneously and processed in parallel

Start "1" "C:\_Daten\_Robots\1\webrobot.exe"

Start "2" "C:\_Daten\_Robots\2\webrobot.exe"

Start "3" "C:\_Daten\_Robots\3\webrobot.exe"

Start "4" "C:\_Daten\_Robots\4\webrobot.exe"

Start "5" "C:\_Daten\_Robots\5\webrobot.exe"

Start "6" "C:\_Daten\_Robots\6\webrobot.exe"

Start "7" "C:\_Daten\_Robots\7\webrobot.exe"

Start "8" "C:\_Daten\_Robots\8\webrobot.exe"

Start "9" "C:\_Daten\_Robots\9\webrobot.exe"

Start "10" "C:\_Daten\_Robots\10\webrobot.exe"

Start "11" "C:\_Daten\_Robots\11\webrobot.exe"