How to run multiple PHP scripts from CLI

风流意气都作罢 提交于 2019-12-24 05:54:12

问题


I have three different crawler scripts that I want to run in parallel and I'm wondering what command do I use to execute all three at the same time.

I'm on a nix platform


回答1:


if you're on a *nix platform, putting space ampersand ( & ) at the end of the command should put it in the background, giving you back your shell to run other commands. Obviously you want to make sure the output of the job goes to a file and not standard output (screen) or the output will get confusing between the various commands




回答2:


An option is to run them in separate windows in screen. This will keep the output neatly compartmentalized, and you can disconnect from the screen leaving it in the background without interrupting the processes.



来源:https://stackoverflow.com/questions/1313215/how-to-run-multiple-php-scripts-from-cli

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!