From 34fcae2ceeea68b843731a4808abfd3f87fedfb9 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sat, 20 Mar 2021 03:43:30 +0800 Subject: [PATCH] modify --- System/Crontab.php | 2 -- System/Process/CrontabProcess.php | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/System/Crontab.php b/System/Crontab.php index a176bfc7..c409460d 100644 --- a/System/Crontab.php +++ b/System/Crontab.php @@ -190,11 +190,9 @@ class Crontab extends BaseObject public function execute(CrontabProcess $process): void { try { - var_dump('execute'); call_user_func($this->handler, $this->params); $this->execute_number += 1; if ($this->execute_number >= $this->max_execute_number) { - $this->clearTimer(); $process->clear($this->getName()); } else if (!$this->isLoop()) { $process->clear($this->getName()); diff --git a/System/Process/CrontabProcess.php b/System/Process/CrontabProcess.php index b7c7cbd9..4bd4c6d3 100644 --- a/System/Process/CrontabProcess.php +++ b/System/Process/CrontabProcess.php @@ -106,6 +106,7 @@ class CrontabProcess extends Process return; } $this->names[$name]->clearTimer(); + unset($this->names[$name]); }