modify
This commit is contained in:
@@ -190,11 +190,9 @@ class Crontab extends BaseObject
|
|||||||
public function execute(CrontabProcess $process): void
|
public function execute(CrontabProcess $process): void
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
var_dump('execute');
|
|
||||||
call_user_func($this->handler, $this->params);
|
call_user_func($this->handler, $this->params);
|
||||||
$this->execute_number += 1;
|
$this->execute_number += 1;
|
||||||
if ($this->execute_number >= $this->max_execute_number) {
|
if ($this->execute_number >= $this->max_execute_number) {
|
||||||
$this->clearTimer();
|
|
||||||
$process->clear($this->getName());
|
$process->clear($this->getName());
|
||||||
} else if (!$this->isLoop()) {
|
} else if (!$this->isLoop()) {
|
||||||
$process->clear($this->getName());
|
$process->clear($this->getName());
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ class CrontabProcess extends Process
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->names[$name]->clearTimer();
|
$this->names[$name]->clearTimer();
|
||||||
|
unset($this->names[$name]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user