mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
更新 readme
This commit is contained in:
parent
4938635ef4
commit
62a29867a3
|
@ -71,8 +71,6 @@ task <file_path> conc <env_name> <account_number>(Optional)
|
|||
task <file_path> desi <env_name> <account_number>
|
||||
# Set task timeout
|
||||
task -m <max_time> <file_path>
|
||||
# Print task log in real time, no need to carry this parameter when creating timed tasks
|
||||
task -l <file_path>
|
||||
# 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 <file_path> -- -u whyour -p password
|
||||
```
|
||||
|
|
|
@ -71,8 +71,6 @@ task <file_path> conc <env_name> <account_number>(可选的)
|
|||
task <file_path> desi <env_name> <account_number>
|
||||
# 设置任务超时时间
|
||||
task -m <max_time> <file_path>
|
||||
# 实时打印任务日志,创建定时任务时,不用携带此参数
|
||||
task -l <file_path>
|
||||
# 使用 -- 分割,-- 后面的参数会传给脚本,下面的例子,脚本就可接收到参数 -u whyour -p password
|
||||
task <file_path> -- -u whyour -p password
|
||||
```
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user