easy answer is: PHP isn't really designed for that sort of functionality, and sending it stop commands could be a real issue. That being said, php already runs as a daemon to some extent sitting on top of apache, if you used it to control other proccesses it would work fine, i.e. the "web consoles" everyone wants to run stuff from home. Having PHP do something at a given interval, say every 5 minutes is not trivial however, and almost always involves using some additional language on top of PHP, such as perl or shell scripting.