Skip to content
Snippets Groups Projects
Commit f6fead74 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #4317 from marcosgdf/bug-3798

FIX #3798 #2519 Cron jobs would never be executed
parents 8f0a004a ae2295d0
No related branches found
No related tags found
No related merge requests found
...@@ -133,8 +133,7 @@ if (is_array($object->lines) && (count($object->lines)>0)) ...@@ -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); 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 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) if (($line->datenextrun < $now) && (empty($line->datestart) || $line->datestart <= $now) && (empty($line->dateend) || $line->dateend >= $now))
|| ((empty($line->datenextrun)) && (empty($line->dateend))))
{ {
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')); 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'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment