如何才能让文件固定时间自动运行? 我有一个批处理,我想让它每天6点自动运行。。。怎么能做到?

如题所述

%time%是系统变量,为系统时间,格式为:时间:分钟:秒.毫秒(xx:xx:xx.xx)用if的命令就可以运行,但无法自动开机。注:时间是字符格式,要加引号。"xx:xx:xx.xx"

例子:
:began
if %time% gtr "06:00:00.00" goto program
goto end
:program
******************************************
(这里是你的程序)
********************************************
goto tail
:end
goto began
:tail
@echo 程序已完成
@pause

吧这个批处理加入开机启动就行了
温馨提示:内容为网友见解,仅供参考
第1个回答  2011-01-29
:hello
start "" "c:\client.exe"
connect
ping 127.0 /n 60>nul
goto hello

rem /n后面可以设置时间,以上保存为bat
第2个回答  2011-01-29
at 13:02 /interactive /every:m,t,w,th,f,s,su shutdown /s /t
rem 每天13:02分关机
at 13:02 /interactive /every:m,t,w,th,f,s,su "f:\hello.bat"
rem 每天13:02分打开f盘的hello.bat
相似回答