waxical
waxical

Reputation: 3896

PHP CLi - Set running on cmd line then continue? Don't want bash script to wait

Hopefully a quick question. I have a .sh script running a php script - the php takes some time to complete and I want the .sh script to proceed.

Is that possible? And if so, how so?

Upvotes: 0

Views: 226

Answers (1)

Arnaud Le Blanc
Arnaud Le Blanc

Reputation: 99921

Have you tried php somescript.php & ? The & at the end causes the sh script to continue executing.

If you want the php script to outlive the shell script, try this:

nohup php somescript.php >/dev/null 2>&1 &

Upvotes: 3

Related Questions