定时任务管理器
$ npm install -g @lppx/taskmgr
$ tm COMMAND
running command...
$ tm (--version)
@lppx/taskmgr/1.0.3 win32-x64 node-v24.11.0
$ tm --help [COMMAND]
USAGE
$ tm COMMAND
...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
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-cache
See code: @oclif/plugin-autocomplete
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
添加脚本到用户配置目录
USAGE
$ tm scripts add PATH
ARGUMENTS
PATH 脚本文件路径
DESCRIPTION
添加脚本到用户配置目录
EXAMPLES
$ tm scripts add ./script.ps1
See code: src/commands/scripts/add.ts
列出用户配置目录下的所有脚本
USAGE
$ tm scripts list
DESCRIPTION
列出用户配置目录下的所有脚本
EXAMPLES
$ tm scripts list
See code: src/commands/scripts/list.ts
打开脚本文件目录
USAGE
$ tm scripts open
DESCRIPTION
打开脚本文件目录
EXAMPLES
$ tm scripts open
See code: src/commands/scripts/open.ts
向数据库中创建一条任务记录
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
从数据库中删除一条任务记录
USAGE
$ tm task delete
DESCRIPTION
从数据库中删除一条任务记录
EXAMPLES
$ tm task delete
See code: src/commands/task/delete.ts
列出数据库中的所有任务记录
USAGE
$ tm task list [-d]
FLAGS
-d, --detailed 显示详细信息
DESCRIPTION
列出数据库中的所有任务记录
EXAMPLES
$ tm task list
$ tm task list --detailed
See code: src/commands/task/list.ts
将数据库中的任务同步到 Windows 系统
USAGE
$ tm task sync [-v]
FLAGS
-v, --verbose 显示详细的同步信息
DESCRIPTION
将数据库中的任务同步到 Windows 系统
EXAMPLES
$ tm task sync
$ tm task sync --verbose
See code: src/commands/task/sync.ts
创建定时任务
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 --psi
See code: src/commands/tsk/add.ts
删除定时任务
USAGE
$ tm tsk del [-i | -n <value>]
FLAGS
-i, --interactive 交互式选择任务
-n, --taskName=<value> 任务名称
DESCRIPTION
删除定时任务
EXAMPLES
$ tm tsk del -n myTask
See code: src/commands/tsk/del.ts
列出所有定时任务
USAGE
$ tm tsk list [--multi]
FLAGS
--[no-]multi 使用多行格式显示任务详情
DESCRIPTION
列出所有定时任务
EXAMPLES
$ tm tsk list
$ tm tsk list --multi
See code: src/commands/tsk/list.ts
启动 Web UI 服务
USAGE
$ tm ui [-p <value>]
FLAGS
-p, --port=<value> [default: 3000] 指定服务端口
DESCRIPTION
启动 Web UI 服务
EXAMPLES
$ tm ui
$ tm ui --port 8080
See code: src/commands/ui/index.ts
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
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