fix(core): check cron expression on save
This commit is contained in:
@@ -79,6 +79,7 @@ class Show extends Component
|
|||||||
$this->validate();
|
$this->validate();
|
||||||
$isValid = validate_cron_expression($this->frequency);
|
$isValid = validate_cron_expression($this->frequency);
|
||||||
if (! $isValid) {
|
if (! $isValid) {
|
||||||
|
$this->frequency = $this->task->frequency;
|
||||||
throw new \Exception('Invalid Cron / Human expression.');
|
throw new \Exception('Invalid Cron / Human expression.');
|
||||||
}
|
}
|
||||||
$this->task->enabled = $this->isEnabled;
|
$this->task->enabled = $this->isEnabled;
|
||||||
|
Reference in New Issue
Block a user