Improvement suggested by @eldy
This commit is contained in:
parent
039039bb00
commit
ae2295d019
@ -133,8 +133,7 @@ if (is_array($object->lines) && (count($object->lines)>0))
|
||||
dol_syslog("cron_run_jobs.php fetch cronjobid: ".$line->id, LOG_WARNING);
|
||||
|
||||
//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) && $line->dateend >= $now)
|
||||
|| ((empty($line->datenextrun)) && (empty($line->dateend))))
|
||||
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,'dayhourtext')." line->dateend:".dol_print_date($line->dateend,'dayhourtext')." now:".dol_print_date($now,'dayhourtext'));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user