Exec command in background in php script

This will run two scripts in the background that are not blocking with standard out and error outputting to a file

exec(“php worker_test.php 1 >> /tmp/worker_test.log 2>&1 &”);
exec(“php worker_test.php 2 >> /tmp/worker_test.log 2>&1 &”);

Leave a comment

0 Comments.