Supporting files for the blog article available at https://pierre.photos/blog/article/9/php-check-start-script.
autoStart.php: check the status of a script and execute it if it's not already running.main.php: a basic process with a loop running for 2 minutes. This is the targeted script ofautoStart.phpProcessControler.php: class containing the methodes used byautoStart.phpto detect if the script is running or not, and to start it.