From 62a29867a3180f90355fd11602e61bca91bc34a3 Mon Sep 17 00:00:00 2001 From: whyour Date: Sat, 21 Oct 2023 16:57:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README-en.md | 2 -- README.md | 2 -- back/services/script.ts | 4 ++-- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/README-en.md b/README-en.md index bd974e62..80d08b17 100644 --- a/README-en.md +++ b/README-en.md @@ -71,8 +71,6 @@ task conc (Optional) task desi # Set task timeout task -m -# Print task log in real time, no need to carry this parameter when creating timed tasks -task -l # Use -- to split, -- followed by a parameter that is passed to the script, as in the following example, the script receives the parameter -u whyour -p password task -- -u whyour -p password ``` diff --git a/README.md b/README.md index 95d7b9bf..ae95c15d 100644 --- a/README.md +++ b/README.md @@ -71,8 +71,6 @@ task conc (可选的) task desi # 设置任务超时时间 task -m -# 实时打印任务日志,创建定时任务时,不用携带此参数 -task -l # 使用 -- 分割,-- 后面的参数会传给脚本,下面的例子,脚本就可接收到参数 -u whyour -p password task -- -u whyour -p password ``` diff --git a/back/services/script.ts b/back/services/script.ts index 03af4929..16bc0e7b 100644 --- a/back/services/script.ts +++ b/back/services/script.ts @@ -42,7 +42,7 @@ export default class ScriptService { public async runScript(filePath: string) { const relativePath = path.relative(config.scriptPath, filePath); - const command = `${TASK_COMMAND} -l ${relativePath} now`; + const command = `${TASK_COMMAND} ${relativePath} now`; const pid = await this.scheduleService.runTask( command, this.taskCallbacks(filePath), @@ -56,7 +56,7 @@ export default class ScriptService { public async stopScript(filePath: string, pid: number) { if (!pid) { const relativePath = path.relative(config.scriptPath, filePath); - pid = await getPid(`${TASK_COMMAND} -l ${relativePath} now`) as number; + pid = await getPid(`${TASK_COMMAND} ${relativePath} now`) as number; } try { await killTask(pid);