From 2abe5bb6cf0a59d383d7f9e7ad99e41476b0f5e6 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sat, 20 Mar 2021 03:11:59 +0800 Subject: [PATCH] modify --- System/Process/CrontabProcess.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/System/Process/CrontabProcess.php b/System/Process/CrontabProcess.php index 23861b36..96e55aeb 100644 --- a/System/Process/CrontabProcess.php +++ b/System/Process/CrontabProcess.php @@ -91,15 +91,15 @@ class CrontabProcess extends Process { /** @var Crontab $content */ $content = unserialize($content); - $runTicker = function (Crontab $crontab) { + $runTicker = function () use ($content) { $this->application->warning('execute crontab ' . date('Y-m-d H:i:s')); - $crontab->execute($this); + $content->execute($this); }; $timer = $content->getTickTime() * 10; if ($content->isLoop()) { - $content->setTimerId(Timer::tick($timer, $runTicker, $content)); + $content->setTimerId(Timer::tick($timer, $runTicker)); } else { - $content->setTimerId(Timer::after($timer, $runTicker, $content)); + $content->setTimerId(Timer::after($timer, $runTicker)); } $this->names[$content->getName()] = $content; }