I want to create a script that run multiple python projects. Each project is blocking (meaning that every project is suppose to run forever) so this script must run each project parallel to the others. In addition I want all of these processes to close once the main shell is closed. Here is the shell code I came up with
%homepath%\Envs\env1\Scripts\pip.exe install -r python-req.txt
%homepath%\Envs\env1\Scripts\python.exe -m bot &
%homepath%\Envs\env2\Scripts\pip.exe install -r python-req.txt
%homepath%\Envs\env2\Scripts\python.exe -m base &
%homepath%\Envs\env3\Scripts\pip.exe install -r python-req.txt
%homepath%\Envs\env3\Scripts\python.exe -m caster &
I tried to use & to make to python process run asynchronously however the the script did not continue after the second line and only the first project is running.
Is there a way to run all the python processes?