From d33335d12526e1e5e30e00365818cfa970b9d81e Mon Sep 17 00:00:00 2001 From: ASUS <515617283@qq.com> Date: Thu, 23 Oct 2025 14:59:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=8E=E6=97=A5=E5=AE=9A=E6=97=B6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/process/MessagePushTask.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/process/MessagePushTask.php b/app/process/MessagePushTask.php index 9f9e48b..66958db 100644 --- a/app/process/MessagePushTask.php +++ b/app/process/MessagePushTask.php @@ -39,6 +39,7 @@ class MessagePushTask // 按天插入过期时间 每天23点30执行 new Crontab('30 23 * * *', function(){ + Log::info('开始插入过期时间'); // 查询只有明天到期的任务 $next_day = date('Y-m-d 00:00:00', strtotime('+1 day')); $next_end_day = date('Y-m-d 23:59:59', strtotime('+1 day')); @@ -49,11 +50,12 @@ class MessagePushTask ->where('send_time', '>=', $next_day) ->where('send_time', '<=', $next_end_day) ->select()->toArray(); + Log::info('开始插入过期时间-》营销短信查询结果' . json_encode($record)); if($record) { foreach ($record as $key => $value) { $stortime = strtotime($value['send_time']); $res = Redis::setEx('expired:sms:'.$value['id'], $stortime - time(), 1); - Log::info('定时任务/营销短信--定时发送,已存入redis, ID-->' .$value['id'] . '/过期时间->>>' . $value['send_time'] . '/' . $stortime - time() . '保存结果' . $res); + Log::info('明日定时任务/营销短信--定时发送,已存入redis, ID-->' .$value['id'] . '/过期时间->>>' . $value['send_time'] . '/' . $stortime - time() . '保存结果' . $res); } } @@ -63,11 +65,12 @@ class MessagePushTask ->where('send_time', '>=', $next_day) ->where('send_time', '<=', $next_end_day) ->select()->toArray(); + Log::info('开始插入过期时间-》微信模版查询结果' . json_encode($record)); if($record) { foreach ($record as $key => $value) { $stortime = strtotime($value['send_time']); $res = Redis::setEx('expired:wechat:'.$value['id'], $stortime - time(), 1); - Log::info('定时任务/发送微信模版消息--定时发送,已存入redis, ID-->' .$value['id'] . '/过期时间->>>' . $value['send_time'] . '/' . $stortime - time() . '保存结果' . $res); + Log::info('明日定时任务/发送微信模版消息--定时发送,已存入redis, ID-->' .$value['id'] . '/过期时间->>>' . $value['send_time'] . '/' . $stortime - time() . '保存结果' . $res); } } });