FIX #2519
This commit is contained in:
parent
4588b2bb4c
commit
29fc2652e1
@ -33,10 +33,10 @@ CREATE TABLE llx_cronjob
|
|||||||
md5params varchar(32),
|
md5params varchar(32),
|
||||||
module_name varchar(255),
|
module_name varchar(255),
|
||||||
priority integer DEFAULT 0,
|
priority integer DEFAULT 0,
|
||||||
datelastrun datetime,
|
datelastrun datetime, -- date last run and when should be next
|
||||||
datenextrun datetime,
|
datenextrun datetime, -- job will be run if current date higher that this date
|
||||||
datestart datetime,
|
datestart datetime, -- before this date no jobs will be run
|
||||||
dateend datetime,
|
dateend datetime, -- after this date, no more jobs will be run
|
||||||
datelastresult datetime,
|
datelastresult datetime,
|
||||||
lastresult text,
|
lastresult text,
|
||||||
lastoutput text,
|
lastoutput text,
|
||||||
|
|||||||
@ -129,9 +129,9 @@ if(is_array($object->lines) && (count($object->lines)>0))
|
|||||||
// Loop over job
|
// Loop over job
|
||||||
foreach($object->lines as $line)
|
foreach($object->lines as $line)
|
||||||
{
|
{
|
||||||
|
//If date_next_jobs is less of current date, execute the program, and store the execution time of the next execution in database
|
||||||
//If date_next_jobs is less of current dat, execute the program, and store the execution time of the next execution in database
|
if (($line->datenextrun < $now) && (empty($line->datestart) || $line->datestart <= $now) && (empty($line->dateend) || $line->dateend >= $now))
|
||||||
if (($line->datenextrun < $now) && $line->dateend < $now){
|
{
|
||||||
$cronjob=new Cronjob($db);
|
$cronjob=new Cronjob($db);
|
||||||
$result=$cronjob->fetch($line->id);
|
$result=$cronjob->fetch($line->id);
|
||||||
if ($result<0) {
|
if ($result<0) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user