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

Better error message

parent 2b825559
No related branches found
No related tags found
No related merge requests found
......@@ -157,7 +157,8 @@ if(is_array($object->lines) && (count($object->lines)>0))
$result=$cronjob->fetch($line->id);
if ($result<0)
{
echo "Error cronjob->fetch: ".$cronjob->error;
echo "Error cronjob->fetch: ".$cronjob->error."\n";
echo "Failed to fetch job ".$line->id."\n";
dol_syslog("cron_run_jobs.php::fetch Error ".$cronjob->error, LOG_ERR);
exit(-1);
}
......@@ -165,7 +166,9 @@ if(is_array($object->lines) && (count($object->lines)>0))
$result=$cronjob->run_jobs($userlogin);
if ($result<0)
{
echo "Error cronjob->run_job: ".$cronjob->error;
echo "Error cronjob->run_job: ".$cronjob->error."\n";
echo "At least one job failed. Go on menu Home-Setup-Admin tools to see result for each job.\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);
exit(-1);
}
......@@ -174,7 +177,8 @@ if(is_array($object->lines) && (count($object->lines)>0))
$result=$cronjob->reprogram_jobs($userlogin, $now);
if ($result<0)
{
echo "Error cronjob->reprogram_job: ".$cronjob->error;
echo "Error cronjob->reprogram_job: ".$cronjob->error."\n";
echo "Enable module Log if not yet enabled, run again and take a look into dolibarr.log file\n";
dol_syslog("cron_run_jobs.php::reprogram_jobs Error ".$cronjob->error, LOG_ERR);
exit(-1);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment