@lppx/taskmgr
v1.0.3
Published
定时任务管理器
Readme
@lppx/taskmgr
定时任务管理器
Usage
$ npm install -g @lppx/taskmgr
$ tm COMMAND
running command...
$ tm (--version)
@lppx/taskmgr/1.0.3 linux-x64 node-v24.14.0
$ tm --help [COMMAND]
USAGE
$ tm COMMAND
...Commands
tm autocomplete [SHELL]tm help [COMMAND]tm scripts add PATHtm scripts listtm scripts opentm task createtm task deletetm task listtm task synctm tsk add TASKNAMEtm tsk deltm tsk listtm uitm versiontm which
tm autocomplete [SHELL]
Display autocomplete installation instructions.
USAGE
$ tm autocomplete [SHELL] [-r]
ARGUMENTS
[SHELL] (zsh|bash|powershell) Shell type
FLAGS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
DESCRIPTION
Display autocomplete installation instructions.
EXAMPLES
$ tm autocomplete
$ tm autocomplete bash
$ tm autocomplete zsh
$ tm autocomplete powershell
$ tm autocomplete --refresh-cacheSee code: @oclif/plugin-autocomplete
tm help [COMMAND]
Display help for tm.
USAGE
$ tm help [COMMAND...] [-n]
ARGUMENTS
[COMMAND...] Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for tm.See code: @oclif/plugin-help
tm scripts add PATH
添加脚本到用户配置目录
USAGE
$ tm scripts add PATH
ARGUMENTS
PATH 脚本文件路径
DESCRIPTION
添加脚本到用户配置目录
EXAMPLES
$ tm scripts add ./script.ps1See code: src/commands/scripts/add.ts
tm scripts list
列出用户配置目录下的所有脚本
USAGE
$ tm scripts list
DESCRIPTION
列出用户配置目录下的所有脚本
EXAMPLES
$ tm scripts listSee code: src/commands/scripts/list.ts
tm scripts open
打开脚本文件目录
USAGE
$ tm scripts open
DESCRIPTION
打开脚本文件目录
EXAMPLES
$ tm scripts openSee code: src/commands/scripts/open.ts
tm task create
向数据库中创建一条任务记录
USAGE
$ tm task create [-i | -n <value> | -d <value> | -p <value> | -a <value> | -t
daily|weekly|monthly|once|boot|logon | --time <value> | --enabled]
FLAGS
-a, --args=<value> 执行参数
-d, --description=<value> 任务描述
-i, --interactive 交互式创建任务
-n, --name=<value> 任务名称
-p, --path=<value> 可执行文件路径
-t, --trigger=<option> 触发类型 (daily|weekly|monthly|once|boot|logon)
<options: daily|weekly|monthly|once|boot|logon>
--[no-]enabled 是否启用
--time=<value> 开始时间 (HH:mm)
DESCRIPTION
向数据库中创建一条任务记录
EXAMPLES
$ tm task create -i
$ tm task create --name "备份任务" --path "C:\backup.bat" --trigger daily --time "02:00"
$ tm task create -n "清理任务" -p "C:\clean.ps1" -t weekly --time "03:00" --args "-Force"See code: src/commands/task/create.ts
tm task delete
从数据库中删除一条任务记录
USAGE
$ tm task delete
DESCRIPTION
从数据库中删除一条任务记录
EXAMPLES
$ tm task deleteSee code: src/commands/task/delete.ts
tm task list
列出数据库中的所有任务记录
USAGE
$ tm task list [-d]
FLAGS
-d, --detailed 显示详细信息
DESCRIPTION
列出数据库中的所有任务记录
EXAMPLES
$ tm task list
$ tm task list --detailedSee code: src/commands/task/list.ts
tm task sync
将数据库中的任务同步到 Windows 系统
USAGE
$ tm task sync [-v]
FLAGS
-v, --verbose 显示详细的同步信息
DESCRIPTION
将数据库中的任务同步到 Windows 系统
EXAMPLES
$ tm task sync
$ tm task sync --verboseSee code: src/commands/task/sync.ts
tm tsk add TASKNAME
创建定时任务
USAGE
$ tm tsk add TASKNAME [-i | | | [-p <value> | | [--arguments <value> --path <value>]]] [--description
<value>] [--time <value>] [--trigger boot|daily|logon|monthly|once|weekly]
ARGUMENTS
TASKNAME 任务名称
FLAGS
-i, --psi 交互式方式选择现有 PowerShell 脚本创建任务
-p, --ps-script=<value> 指定PowerShell 脚本路径,自动使用 powershell.exe 执行
--arguments=<value> 执行参数
--description=<value> 任务描述
--path=<value> 可执行文件路径
--time=<value> [default: 09:00] 任务开始时间 (HH:mm)
--trigger=<option> [default: daily] 触发类型: daily, weekly, monthly, once, boot, logon
<options: boot|daily|logon|monthly|once|weekly>
DESCRIPTION
创建定时任务
EXAMPLES
交互式选择现有 PowerShell 脚本创建任务
$ tm tsk add testTask --psiSee code: src/commands/tsk/add.ts
tm tsk del
删除定时任务
USAGE
$ tm tsk del [-i | -n <value>]
FLAGS
-i, --interactive 交互式选择任务
-n, --taskName=<value> 任务名称
DESCRIPTION
删除定时任务
EXAMPLES
$ tm tsk del -n myTaskSee code: src/commands/tsk/del.ts
tm tsk list
列出所有定时任务
USAGE
$ tm tsk list [--multi]
FLAGS
--[no-]multi 使用多行格式显示任务详情
DESCRIPTION
列出所有定时任务
EXAMPLES
$ tm tsk list
$ tm tsk list --multiSee code: src/commands/tsk/list.ts
tm ui
启动 Web UI 服务
USAGE
$ tm ui [-p <value>]
FLAGS
-p, --port=<value> [default: 3000] 指定服务端口
DESCRIPTION
启动 Web UI 服务
EXAMPLES
$ tm ui
$ tm ui --port 8080See code: src/commands/ui/index.ts
tm version
USAGE
$ tm version [--json] [--verbose]
FLAGS
--verbose Show additional information about the CLI.
GLOBAL FLAGS
--json Format output as json.
FLAG DESCRIPTIONS
--verbose Show additional information about the CLI.
Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using.See code: @oclif/plugin-version
tm which
Show which plugin a command is in.
USAGE
$ tm which [--json]
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Show which plugin a command is in.
EXAMPLES
See which plugin the `help` command is in:
$ tm which help
Use colon separators.
$ tm which foo:bar:baz
Use spaces as separators.
$ tm which foo bar baz
Wrap command in quotes to use spaces as separators.
$ tm which "foo bar baz"See code: @oclif/plugin-which
