private function execTask(TimerModel $task) { $params = json_decode($task->params); $className = $task->class; $methodName = $task->method; if (method_exists($className, $methodName)) { Utils::call_func($className, $methodName, $params); // TimerModel::deleteTask($task->id); $task->delete(); } echo "timer called " . $methodName . '计划时间:' . date('Y-m-d H:i:s', $task->exec_time) . ' 执行时间:' . date('Y-m-d H:i:s') . PHP_EOL; $this->executor = null; $this->setExecutor(); }