Fix
This commit is contained in:
parent
41545e0d60
commit
8d3adfd1c9
@ -124,8 +124,7 @@ if (isset($argv[3]) || $argv[3])
|
||||
$object = new Cronjob($db);
|
||||
|
||||
$filter=array();
|
||||
if (empty($id)) {
|
||||
$filter=array();
|
||||
if (! empty($id)) {
|
||||
$filter['t.rowid']=$id;
|
||||
}
|
||||
|
||||
@ -152,7 +151,7 @@ if(is_array($object->lines) && (count($object->lines)>0))
|
||||
//If date_next_jobs is less of current date, 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))
|
||||
{
|
||||
dol_syslog("cron_run_jobs.php:: torun line->datenextrun:".dol_print_date($line->datenextrun,'dayhourrfc')." line->dateend:".dol_print_date($line->dateend,'dayhourrfc')." now:".dol_print_date($now,'dayhourrfc'));
|
||||
dol_syslog("cron_run_jobs.php:: to run line->datenextrun:".dol_print_date($line->datenextrun,'dayhourrfc')." line->dateend:".dol_print_date($line->dateend,'dayhourrfc')." now:".dol_print_date($now,'dayhourrfc'));
|
||||
|
||||
$cronjob=new Cronjob($db);
|
||||
$result=$cronjob->fetch($line->id);
|
||||
@ -181,6 +180,10 @@ if(is_array($object->lines) && (count($object->lines)>0))
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog("cron_run_jobs.php:: job not qualified line->datenextrun:".dol_print_date($line->datenextrun,'dayhourrfc')." line->dateend:".dol_print_date($line->dateend,'dayhourrfc')." now:".dol_print_date($now,'dayhourrfc'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user