spandor
asked on
Creating a daemon on Unix server to keep running PHP script.
Hi
I have a PHP script which usualy I start from command line by writing: php picker.php.
And that works.
However, I'd like to create a daemon in order to have this script working all the time. How I can do this??
I have a PHP script which usualy I start from command line by writing: php picker.php.
And that works.
However, I'd like to create a daemon in order to have this script working all the time. How I can do this??
ASKER
Hey.
Thanks for the replay, options 2 sounds good for me :)
Thanks for the replay, options 2 sounds good for me :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If the script itself has a built-in execution loop, i.e. if it never exits when left by itself, then you can write a shell script that will manage the script as a service, making sure it starts when the server boots, and to restart it if it dies.
Please let me know if you'd like more information on either of these options.
Thanks!