Rectangle 27 0

api Fire a (multi) curl request and don't wait for the response (PHP)?


Have a look at the PHP port of Ruby's delayed_job.

Note
Rectangle 27 0

api Fire a (multi) curl request and don't wait for the response (PHP)?


nohup php /path/to/script.1.php &
nohup php /path/to/script.2.php &
nohup php /path/to/script.3.php &

Good solution, although I might get in trouble when I have to do domain-specific things on one server.

I'm not privy to your particular setup, but you might be able to create a single script that runs your PHP scripts in the background with a bash script like this:

The ampersand at the end tells it to run the script in the background. the "nohup" command tells it to ignore any hangup signal, ensuring the script will continue running even if the user logs out.

This ended up being the essence of what I finally used as a solution.

Note