Fix data next run of a job mandatory only if status is enabled
This commit is contained in:
parent
777b451316
commit
5cf1ed058f
@ -741,7 +741,7 @@ class Cronjob extends CommonObject
|
|||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
// Put here code to add a control on parameters values
|
// Put here code to add a control on parameters values
|
||||||
if (dol_strlen($this->datenextrun) == 0) {
|
if (dol_strlen($this->datenextrun) == 0 && $this->status == self::STATUS_ENABLED) {
|
||||||
$this->errors[] = $langs->trans('CronFieldMandatory', $langs->transnoentitiesnoconv('CronDtNextLaunch'));
|
$this->errors[] = $langs->trans('CronFieldMandatory', $langs->transnoentitiesnoconv('CronDtNextLaunch'));
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user