批处理 - 多线程工匠服务器

The question is straight forward, how can I run two php artisan commands at the same time?

I have two commands:

php artisan serve --host=0.0.0.0 --port=80 and php artisan queue:work --queue=high,default

If I run them in seperated cmd windows, it works, but I would like to have them in just one cmd window.

Is this possible? I currently have this code:

@ECHO OFF
ECHO Starting DigiCoach Application
TITLE Digicoach Console application
ECHO This might take a while...
CMD /T:70 /b php artisan serve --host=0.0.0.0 --port=80
CMD /T:70 /b php artisan queue:work --queue=high,default

If you start them they will run in parralel:

Start "" php artisan serve --host=0.0.0.0 --port=80
Start "" php artisan queue:work --queue=high,default

Edit. As per @Aacini's comment the /b switch might be useful to what you require as it starts both commands without opening a new window.

Start /b "" php artisan serve --host=0.0.0.0 --port=80
Start /b "" php artisan queue:work --queue=high,default

I would however not recommend this as the output will not be what you expect. Something like calling something as simple as 2 ping commands can give an output that seems to be of an unknown language as the one commands output interferes with the others.