Skip to content
Snippets Groups Projects
Commit 6b3cbc91 authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: wrong "lastoutput" and "lastresult" if jobtype is "method" or

"function"
parent 965011c8
Branches
Tags
No related merge requests found
...@@ -1033,11 +1033,9 @@ class Cronjob extends CommonObject ...@@ -1033,11 +1033,9 @@ class Cronjob extends CommonObject
} }
if (! empty($conf->global->MAIN_UMASK)) @chmod($outputfile, octdec($conf->global->MAIN_UMASK)); if (! empty($conf->global->MAIN_UMASK)) @chmod($outputfile, octdec($conf->global->MAIN_UMASK));
} }
}
dol_syslog(get_class($this)."::run_jobs output_arr:".var_export($output_arr,true), LOG_DEBUG); dol_syslog(get_class($this)."::run_jobs output_arr:".var_export($output_arr,true), LOG_DEBUG);
// Update with result // Update with result
$this->lastoutput=''; $this->lastoutput='';
if (is_array($output_arr) && count($output_arr)>0) if (is_array($output_arr) && count($output_arr)>0)
...@@ -1048,6 +1046,8 @@ class Cronjob extends CommonObject ...@@ -1048,6 +1046,8 @@ class Cronjob extends CommonObject
} }
} }
$this->lastresult=$retval; $this->lastresult=$retval;
}
$this->datelastresult=dol_now(); $this->datelastresult=dol_now();
$result = $this->update($user); $result = $this->update($user);
if ($result < 0) if ($result < 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment