fix(core): check cron expression on save
This commit is contained in:
parent
497a7ac15a
commit
8f1bde2534
1 changed files with 1 additions and 0 deletions
|
|
@ -79,6 +79,7 @@ public function syncData(bool $toModel = false)
|
|||
$this->validate();
|
||||
$isValid = validate_cron_expression($this->frequency);
|
||||
if (! $isValid) {
|
||||
$this->frequency = $this->task->frequency;
|
||||
throw new \Exception('Invalid Cron / Human expression.');
|
||||
}
|
||||
$this->task->enabled = $this->isEnabled;
|
||||
|
|
|
|||
Loading…
Reference in a new issue