Y
Y
Yurka Blokhin2017-03-16 13:31:40
linux
Yurka Blokhin, 2017-03-16 13:31:40

How to run a php script without cron so that it continues to run in the background?

Please tell me how to run a php script through the terminal so that it continues to work even if the connection to the server was broken.
Now I do this: php /var/www/text.php, but when the terminal is closed, the script stops working.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Axian Ltd., 2017-03-16
@blrik

If the host is *nix then here are some options stackoverflow.com/questions/2036654/run-php-script...

K
k0nsu1, 2017-03-16
@k0nsu1

Run with screen help.ubuntu.ru/wiki/screen

A
Anton Anton, 2017-03-16
@Fragster

php /var/www/text.php > /dev/null 2> /dev/null &
I don't know how with php, but with node it works :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question