Skip to content

Commit

Permalink
Improvement suggested by @eldy
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosgdf committed Jan 3, 2016
1 parent 039039b commit ae2295d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions htdocs/public/cron/cron_run_jobs.php
Expand Up @@ -133,8 +133,7 @@
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'));
Expand Down

0 comments on commit ae2295d

Please sign in to comment.