* Optimize logging for cron process.

This commit is contained in:
dingguodong
2023-08-08 15:26:28 +08:00
parent cd333794b7
commit 36a278975b
+6 -1
View File
@@ -208,6 +208,11 @@ class cron extends control
$return = '';
if($cron['command'])
{
/* Save log of executing cron. */
$time = $now->format('Y-m-d H:i:s');
$log = "\n$time task " . $id . " executing,\ncommand: $cron[command]\n";
$this->cron->logCron($log);
if(isset($crons[$id]) and $crons[$id]->type == 'zentao')
{
parse_str($cron['command'], $params);
@@ -223,7 +228,7 @@ class cron extends control
if($output) $output = join("\n", $output);
}
/* Save log. */
/* Save log of executed cron. */
$time = $now->format('Y-m-d H:i:s');
$output = $output;