From 7dc61c944863be4ad3cb2549f8b395922e95ae93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Wed, 22 Feb 2023 10:06:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=9A=E6=97=B6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E7=9B=B4=E6=8E=A5=E8=AE=BF=E9=97=AE=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E7=9A=84time=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/system/crontab/SystemCrontabServices.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crmeb/app/services/system/crontab/SystemCrontabServices.php b/crmeb/app/services/system/crontab/SystemCrontabServices.php index 5dd23568f..3bba16f7c 100644 --- a/crmeb/app/services/system/crontab/SystemCrontabServices.php +++ b/crmeb/app/services/system/crontab/SystemCrontabServices.php @@ -205,10 +205,11 @@ class SystemCrontabServices extends BaseServices */ public function crontabRun() { - file_put_contents(root_path() . 'runtime/.timer', time()); //检测定时任务是否正常 + $time = time(); + file_put_contents(root_path() . 'runtime/.timer', $time); //检测定时任务是否正常 $list = $this->dao->selectList(['is_open' => 1, 'is_del' => 0])->toArray(); foreach ($list as $item) { - if ($item['next_execution_time'] < time()) { + if ($item['next_execution_time'] < $time) { if ($item['mark'] == 'order_cancel') { //未支付自动取消订单 app()->make(StoreOrderServices::class)->orderUnpaidCancel();