I have a PHP script launched from a command-line (aka CLI mode, no webserver involved).In this script I launch a command that will run from some time, usually exiting after a couple minutes. But at times, this command will run for hours because of various issues, and the best I can do is kill it and wait for a while before launching it again.Two things I want to emphasize :
- I have no control of the code inside that command, and can't improve failure detection.
- It's not an important task, and it's perfectly ok to have it working that way.