-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
datenextrun is mandatory as dolibarr 16.0 (#28344)
- Loading branch information
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <[email protected]> | ||
* Copyright (C) 2004 Sebastien Di Cintio <[email protected]> | ||
* Copyright (C) 2004 Benoit Mortier <[email protected]> | ||
* Copyright (C) 2004 Eric Seigne <[email protected]> | ||
* Copyright (C) 2004-2023 Eric Seigne <[email protected]> | ||
* Copyright (C) 2005-2013 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2012 Regis Houssin <[email protected]> | ||
* Copyright (C) 2014 Raphaël Doursenaud <[email protected]> | ||
|
@@ -1445,6 +1445,7 @@ public function insert_cronjobs() | |
$frequency = isset($this->cronjobs[$key]['frequency']) ? $this->cronjobs[$key]['frequency'] : ''; | ||
$unitfrequency = isset($this->cronjobs[$key]['unitfrequency']) ? $this->cronjobs[$key]['unitfrequency'] : ''; | ||
$priority = isset($this->cronjobs[$key]['priority']) ? $this->cronjobs[$key]['priority'] : ''; | ||
$datenextrun = isset($this->cronjobs[$key]['datenextrun']) ? $this->cronjobs[$key]['datenextrun'] : ''; | ||
$datestart = isset($this->cronjobs[$key]['datestart']) ? $this->cronjobs[$key]['datestart'] : ''; | ||
$dateend = isset($this->cronjobs[$key]['dateend']) ? $this->cronjobs[$key]['dateend'] : ''; | ||
$status = isset($this->cronjobs[$key]['status']) ? $this->cronjobs[$key]['status'] : ''; | ||
|
@@ -1480,7 +1481,7 @@ public function insert_cronjobs() | |
$this->db->begin(); | ||
|
||
if (!$err) { | ||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."cronjob (module_name, datec, datestart, dateend, label, jobtype, classesname, objectname, methodename, command, params, note,"; | ||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."cronjob (module_name, datec, datenextrun, datestart, dateend, label, jobtype, classesname, objectname, methodename, command, params, note,"; | ||
if (is_int($frequency)) { | ||
$sql .= ' frequency,'; | ||
} | ||
|
@@ -1497,6 +1498,7 @@ public function insert_cronjobs() | |
$sql .= " VALUES ("; | ||
$sql .= "'".$this->db->escape(empty($this->rights_class) ?strtolower($this->name) : $this->rights_class)."', "; | ||
$sql .= "'".$this->db->idate($now)."', "; | ||
$sql .= ($datenextrun ? "'".$this->db->idate($datenextrun)."'" : "'".$this->db->idate($now)."'").", "; | ||
$sql .= ($datestart ? "'".$this->db->idate($datestart)."'" : "'".$this->db->idate($now)."'").", "; | ||
$sql .= ($dateend ? "'".$this->db->idate($dateend)."'" : "NULL").", "; | ||
$sql .= "'".$this->db->escape($label)."', "; | ||
|