Sometimes we want a PHP script to run all day and all night as a background process, not directly under control of the user, but as a system like daemon. This is surprisingly easy thing to do with a PHP Script.
I have written a simple example how to do this using PHP. It should get you up to speed quickly, and could be used as a framework to write your own more sophisticated background processes.
You can find it here https://evadinggrid.wordpress.com/php-cli-command-line-scriting/how-to-with-php-write-a-background-daemon-server-process/
Advertisements