首页 > 代码库 > dos定时执行,dos timer
dos定时执行,dos timer
<pre name="code" class="csharp">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=160902) 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 Hello world!) else @call %3 goto out :exit timeout 3 /NOBREAK goto start :out if %errorlevel%==0 (echo %3 finished at %date% %time%) else echo running %3 failed at %date% %time% pause exit
dos定时执行,dos timer
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。