问题
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