1
This commit is contained in:
@@ -81,8 +81,8 @@ class TaskSchedulerCommand extends Command
|
||||
return false;
|
||||
}
|
||||
|
||||
// 设置日志目录
|
||||
$this->logDir = runtime_path() . 'log' . DIRECTORY_SEPARATOR;
|
||||
// 设置日志目录(注意要使用全局函数,避免命名空间影响)
|
||||
$this->logDir = \runtime_path() . 'log' . DIRECTORY_SEPARATOR;
|
||||
if (!is_dir($this->logDir)) {
|
||||
mkdir($this->logDir, 0755, true);
|
||||
}
|
||||
@@ -333,7 +333,8 @@ class TaskSchedulerCommand extends Command
|
||||
}
|
||||
|
||||
// 构建命令
|
||||
$thinkPath = root_path() . 'think';
|
||||
// 使用项目根目录下的 think 脚本(同命令行 php think)
|
||||
$thinkPath = \root_path() . 'think';
|
||||
$command = "php {$thinkPath} {$task['command']}";
|
||||
if (!empty($task['options'])) {
|
||||
foreach ($task['options'] as $option) {
|
||||
|
||||
Reference in New Issue
Block a user