首页 > 代码库 > 在任务计划程序用Bat命令执行exe程序

在任务计划程序用Bat命令执行exe程序

@echo off
:open
choice /c:123 /m "1:创建,2:终止,3:删除"
if errorlevel 3 goto delete
if errorlevel 2 goto end
if errorlevel 1 goto create

:create
@schtasks /create /tn "FLT_ConsolidationJob" /tr "%cd%\bin\Debug\ConsolidationJob.exe" /sc minute /mo 1
goto close

:end
schtasks /end /tn "FLT_ConsolidationJob"
goto close

:delete
@schtasks /delete /tn "FLT_ConsolidationJob"
goto close

:close

pause

重点在:create, 至于参数的说明, 暂时请百度吧.