Tim
Tim

Reputation: 982

How to run multiple PHP scripts from CLI

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

Upvotes: 1

Views: 3280

Answers (2)

Williham Totland
Williham Totland

Reputation: 29009

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.

Upvotes: 1

Devin Ceartas
Devin Ceartas

Reputation: 4829

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

Upvotes: 3

Related Questions