forked from Wavyzz/dolibarr
#FIX : datenextrun for CRON (#30724)
* FIX : datenextrun for CRON * FIX : CRON datenextrun * replace by idate --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
@@ -1505,6 +1505,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
$dateend = isset($this->cronjobs[$key]['dateend']) ? $this->cronjobs[$key]['dateend'] : '';
|
||||
$status = isset($this->cronjobs[$key]['status']) ? $this->cronjobs[$key]['status'] : '';
|
||||
$test = isset($this->cronjobs[$key]['test']) ? $this->cronjobs[$key]['test'] : ''; // Line must be enabled or not (so visible or not)
|
||||
$datenextrun = isset($this->cronjobs[$key]['datenextrun']) ? $this->cronjobs[$key]['datenextrun'] : '';
|
||||
|
||||
// Search if cron entry already present
|
||||
$sql = "SELECT count(*) as nb FROM ".MAIN_DB_PREFIX."cronjob";
|
||||
@@ -1546,6 +1547,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
if (is_int($priority)) {
|
||||
$sql .= ' priority,';
|
||||
}
|
||||
if (!empty($datenextrun)) {
|
||||
$sql .= ' datenextrun,';
|
||||
}
|
||||
if (is_int($status)) {
|
||||
$sql .= ' status,';
|
||||
}
|
||||
@@ -1572,6 +1576,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
if (is_int($priority)) {
|
||||
$sql .= "'".$this->db->escape($priority)."', ";
|
||||
}
|
||||
if (!empty($datenextrun)) {
|
||||
$sql .= "'".$this->db->idate($datenextrun)."', ";
|
||||
}
|
||||
if (is_int($status)) {
|
||||
$sql .= ((int) $status).", ";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user