Home > php教程 > php手册 > body text

php定时任务: PHP定时执行任务的实现

WBOY
Release: 2016-06-21 08:49:46
Original
982 people have browsed it

ignore_user_abort();//关掉浏览器,PHP脚本也可以继续执行.
set_time_limit(0);// 通过set_time_limit(0)可以让程序无限制的执行下去
$interval=60*30;// 每隔半小时运行
do{
//这里是你要执行的代码
sleep($interval);// 等待5分钟
}while(true);
本文链接http://www.cxybl.com/html/wlbc/Php/20130607/38420.html



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!