码迷,mamicode.com
首页 > 其他好文 > 详细

dos定时运行,dos timer

时间:2015-03-17 15:52:33      阅读:153      评论:0      收藏:0      [点我收藏+]

标签:dos定时运行   dos timer   

mode   con:lines=6
mode   con:cols=67
@echo off & setLocal EnableDelayedExpansion
:start
cls
if "%1"=="" (@set dd=%date:~6,4%%date:~0,2%%date:~3,2%) else @set dd=%1
if "%2"=="" (@set tt=202502) else @set tt=%2
@echo Job %3 will run at %dd:~0,4%-%dd:~4,2%-%dd:~6,2% on %tt:~0,2%:%tt:~2,2%:%tt:~4,2%
@echo Times now: %date:~6,4%-%date:~0,2%-%date:~3,2% %time:~0,2%:%time:~3,2%:%time:~6,2%
@set d= %date:~6,4%%date:~0,2%%date:~3,2%
@set t=%time:~0,2%%time:~3,2%%time:~6,2%
if %d% geq %dd% goto s1
goto exit
:s1
if %t% geq %tt% goto s2
goto exit
:s2
ECHO START TO RUN %3 ...
TIMEOUT 10
if "%3"=="" ( @echo ------------ %TIME% DONE) else @call %3
goto out
:exit
timeout 3 /NOBREAK
goto start
:out
pause
exit
技术分享

dos定时运行,dos timer

标签:dos定时运行   dos timer   

原文地址:http://blog.csdn.net/wangzhpwang/article/details/44342225

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!