/**
批量处理订单
*/
public function auto_order()
{
ignore_user_abort(); // 后台运行
set_time_limit(0); // 取消脚本运行时间的超时上限
do{
sleep(60); // 休眠1分钟
$this->automatic_receipt(); /*7天自动收货*/
$this->auto_cancel_order(); /*未支付订单自动取消*/
$this->no_pay_remind(); /*未支付订单提醒(半小时)*/
}while(true);
}
> 这里是引用(https://www.cnblogs.com/lookphp/p/5276530.html)
让PHP程序永远在后台运行
最新推荐文章于 2024-05-30 12:54:24 发布