mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-24 07:16:08 +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>
|
task <file_path> desi <env_name> <account_number>
|
||||||
# Set task timeout
|
# Set task timeout
|
||||||
task -m <max_time> <file_path>
|
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
|
# 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
|
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 <file_path> desi <env_name> <account_number>
|
||||||
# 设置任务超时时间
|
# 设置任务超时时间
|
||||||
task -m <max_time> <file_path>
|
task -m <max_time> <file_path>
|
||||||
# 实时打印任务日志,创建定时任务时,不用携带此参数
|
|
||||||
task -l <file_path>
|
|
||||||
# 使用 -- 分割,-- 后面的参数会传给脚本,下面的例子,脚本就可接收到参数 -u whyour -p password
|
# 使用 -- 分割,-- 后面的参数会传给脚本,下面的例子,脚本就可接收到参数 -u whyour -p password
|
||||||
task <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) {
|
public async runScript(filePath: string) {
|
||||||
const relativePath = path.relative(config.scriptPath, filePath);
|
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(
|
const pid = await this.scheduleService.runTask(
|
||||||
command,
|
command,
|
||||||
this.taskCallbacks(filePath),
|
this.taskCallbacks(filePath),
|
||||||
|
@ -56,7 +56,7 @@ export default class ScriptService {
|
||||||
public async stopScript(filePath: string, pid: number) {
|
public async stopScript(filePath: string, pid: number) {
|
||||||
if (!pid) {
|
if (!pid) {
|
||||||
const relativePath = path.relative(config.scriptPath, filePath);
|
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 {
|
try {
|
||||||
await killTask(pid);
|
await killTask(pid);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user