Better log

This commit is contained in:
Laurent Destailleur 2020-05-10 18:31:55 +02:00
parent 501f1ba2c4
commit fbbb898d52

View File

@ -227,11 +227,13 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) {
echo "You can also enable module Log if not yet enabled, run again and take a look into dolibarr.log file\n"; echo "You can also enable module Log if not yet enabled, run again and take a look into dolibarr.log file\n";
dol_syslog("cron_run_jobs.php::run_jobs Error ".$cronjob->error, LOG_ERR); dol_syslog("cron_run_jobs.php::run_jobs Error ".$cronjob->error, LOG_ERR);
$nbofjobslaunchedko++; $nbofjobslaunchedko++;
$resultstring = 'KO';
} else { } else {
$nbofjobslaunchedok++; $nbofjobslaunchedok++;
$resultstring = 'OK';
} }
echo " - result of run_jobs = ".$result; echo " - run_jobs ".$resultstring." result = ".$result;
// We re-program the next execution and stores the last execution time for this job // We re-program the next execution and stores the last execution time for this job
$result = $cronjob->reprogram_jobs($userlogin, $now); $result = $cronjob->reprogram_jobs($userlogin, $now);