This little script is handy to have in one's tool box in the event that cron or other triggering methods are not available. Once executed in the browser, it will run in the background indefinitely and loop through whatever desired script every 15 minutes.
It works well, HOWEVER... the only way I can halt the script is to restart the server. Does anyone have a better idea how to terminate the script if or when so desired???
<?php
ignore_user_abort(TRUE); // run script in background
set_time_limit(0); // run script forever
$interval=60*1; // do every 1 minutes...
do{
// add the script that has to be run every 15 minutes here
// ...
sleep($interval); // wait 15 minutes
} while(true);
?>