PHP scheduled task execution

From , 3 Years ago, written in PHP, viewed 79 times.
URL https://pastebin.vip/view/ef67f7c2
  1. //php定时执行任务,需要设置脚本超时
  2. ignore_user_abort();    //关掉浏览器  PHP脚本也可以继续执行.
  3. set_time_limit(0);        // 通过set_time_limit(0)可以让程序无限制的执行下去
  4. $interval=60*30;        // 每隔半小时运行
  5. do{
  6.         //这里是你要执行的代码       
  7.         sleep($interval);// 等待5分钟
  8. }while(true);

Reply to "PHP scheduled task execution"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website