11智能在线
新记
如何才能让文件固定时间自动运行? 我有一个批处理,我想让它每天6点自动运行。。。怎么能做到?
如题所述
举报该文章
相关建议 2011-01-28
%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
吧这个批处理加入开机启动就行了
温馨提示:内容为网友见解,仅供参考
当前网址:
https://11.t2y.org/zz/ppqs2psp4.html
其他看法
第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
相似回答
大家正在搜
相关问题
用批处理怎么实现在每天的某个时间点自动运行一个固定的程序
请教,如何让BAT文件隔一段时间自动运行?
如何做写一个批处理文件,能每隔一定的时间自动运行同样的命令
如何让一个批处理定时运行
我有一个批处理文件,如何让它每5分钟执行一次。每天不间断的?
我想要个能在凌晨1点-6点电脑开机就执行程序的P处理,白天不...