Functions used ignore_user_abort(),set_time_limit(0),sleep($interval)
Just run this code once and then close the browser.
ignore_user_abort();//Close the browser and the PHP script can continue to execute.
set_time_limit(0); // Through set_time_limit(0), the program can be executed without limit
$interval=60*30;//Run every half hour
do{
// www.2cto.com Here is the code you want to execute
sleep($interval);//wait 5 minutes
}while(true);
http://itsafe.org/?p=456