This commit is contained in:
as2252258@163.com
2021-03-20 02:51:37 +08:00
parent a4092b8a5f
commit 5b5deb45e9
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -188,10 +188,10 @@ class Crontab extends BaseObject
public function execute(): void
{
try {
var_dump('execute');
call_user_func($this->handler, $this->params);
$this->execute_number += 1;
if ($this->execute_number < $this->max_execute_number) {
if ($this->execute_number >= $this->max_execute_number) {
$this->clearTimer();
}
} catch (\Throwable $throwable) {
+1
View File
@@ -78,6 +78,7 @@ class CrontabProcess extends Process
*/
private function jobDelivery($content)
{
/** @var Crontab $content */
$content = unserialize($content);
$this->names[$content->getName()] = $content;