怎么用批处理建立计划任务

来源:互联网 发布:java汉化版 编辑:程序博客网 时间:2024/05/01 20:47
@echo off
rem 首先打开机本的计划任务服务,服务名称为schedule
rem 利用sc config 改变服务的启动方式,auto为自动注意空格如下:
sc config schedule start= auto
rem 启动服务
net start schedule
rem 添加一个计划任务,时间和程序启动的路径自己改。
at 23:47 /interactive cmd /c start e:\weather.exe
at 23:47 /interactive cmd /c start e:\WBWallPaper.exe
rem 以下是让你查看添加了什么任务,如果加到开机P中的话,请去掉下面两行。
cls&echo 已经添加计划任务,ID如下: (按任意键退出)
at|find "今天"&pause>nul

如果不加/interactive 程序将在后台执行。
0 0