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()); }