Answer the question
In order to leave comments, you need to log in
How to run an eternal process in Linux?
#!/bin/bash
while true;
do /usr/bin/php7.2 index.php;
sleep 1;
done
Answer the question
In order to leave comments, you need to log in
use supervisor, if the script crashes then the supervisor will pick it up
if this is meant forever, then write a daemon script for your init system and let it work under its supervision.
start/stop/status through the initialization system.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question