From e4d5aba911b63ae14ad2d2e4d509cde74bc3226e Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sat, 17 Apr 2021 15:45:02 +0800 Subject: [PATCH] modify --- System/Crontab/Crontab.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/System/Crontab/Crontab.php b/System/Crontab/Crontab.php index fe76e398..31f95b8b 100644 --- a/System/Crontab/Crontab.php +++ b/System/Crontab/Crontab.php @@ -214,14 +214,18 @@ abstract class Crontab extends BaseObject } - /** - * @return bool|int - * @throws Exception - */ + /** + * @return bool|int + * @throws Exception + */ public function isRecover(): bool|int { try { $redis = Snowflake::app()->getRedis(); + if ($redis->exists('stop:crontab:' . $this->getName())) { + $redis->del('stop:crontab:' . $this->getName()); + return true; + } if ($this->isExit()) { return $redis->del('crontab:' . $this->getName()); }