From c1ebf0ec6fbd3fc9522065e3c62b27b410bcae5b Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Fri, 26 Mar 2021 02:20:17 +0800 Subject: [PATCH] modify --- System/Crontab/Crontab.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/System/Crontab/Crontab.php b/System/Crontab/Crontab.php index eca0bb7c..a9ecf4ea 100644 --- a/System/Crontab/Crontab.php +++ b/System/Crontab/Crontab.php @@ -199,7 +199,11 @@ class Crontab extends BaseObject */ public function execute(): void { - var_dump(call_user_func($this->handler, $this->params, $this->name)); + $params = call_user_func($this->handler, $this->params, $this->name); + if ($params !== null) { + $name = date('Y_m_d_H_i_s.' . $this->name . '.log'); + write(storage($name, '/log/crontab'), serialize($params)); + } }