windows 定时任务

创建定时任务

创建定时任务,时间间隔为1min,开始时间为04:00:00,任务名称为backupSchedule,运行当前目录下的copyData.bat脚本

schtasks /create /sc minute /mo 1 /st 04:00:00 /tn "backupSchedule" /tr %cd%\copyData

 

低版本的系统(如windows server 2003),需要加上bat脚本文件的文件类型后缀".bat"

schtasks /create /sc minute /mo 1 /st 04:00:00 /tn "backupSchedule" /tr %cd%\copyData.bat

删除定时任务

删除名称为backupSchedule的定时任务

schtasks /delete /tn backupSchedule /f

 

查询定时任务

查询名称为backupSchedule的定时任务

chcp 437

schtasks /query /tn backupSchedule

pause

posted @ 2014-04-09 11:09  Annie118  阅读(733)  评论(0编辑  收藏  举报