FIX: seguir cuando existe error.
This commit is contained in:
@ -5,6 +5,7 @@ use Cron\CronExpression;
|
|||||||
use DateTimeInterface;
|
use DateTimeInterface;
|
||||||
use DateTimeImmutable;
|
use DateTimeImmutable;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
|
use Throwable;
|
||||||
|
|
||||||
class Schedule
|
class Schedule
|
||||||
{
|
{
|
||||||
@ -22,7 +23,12 @@ class Schedule
|
|||||||
if (trim($line) === '' or str_starts_with('#', $line)) {
|
if (trim($line) === '' or str_starts_with('#', $line)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$data = $this->parseCommandLine($line);
|
try {
|
||||||
|
$data = $this->parseCommandLine($line);
|
||||||
|
} catch (Throwable $exception) {
|
||||||
|
$this->logger->error($exception->getMessage());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if ($this->processSchedule($now, $data)) {
|
if ($this->processSchedule($now, $data)) {
|
||||||
$commands[] = $data['command'];
|
$commands[] = $data['command'];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user