If you want to run php script as daemon process? Yes, there are some drawbacks, but not possible to control? That’s just wrong.
kill processid will stop it. And it’s still the best and simplest solution.
Here is a basic example:
/* Remove the execution time limit */
/* Iteration interval in seconds */
$sleep_time = 600;
/* Sleep for the iteration interval */
/* Print the time (to the console) */
echo 'Time: ' . date('H:i:s');
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.