批处理 5分钟运行一次程序?

来源:百度知道 编辑:UC知道 时间:2024/07/12 16:51:51
先开个IE然后每五分钟自动再开个IE怎么写这批处理啊?

用VBS吧,VBS要比BAT好很多,而且好用
以下是代码:
do
set ie=createobject("internetexplorer.application")
ie.visible=true
ie.navigate "about:blank"
wscript.sleep 300000
loop
以上这个代码就可以完成你要做的任务了

用批处理的话是以下代码:
@echo off
:abc
start "%systemdrive%\Program Files\Internet Explorer\iexplore.exe"
ping 127.0.0.1 -n 300
goto abc

@echo off
:ag
start "" "http://www.baidu.com"
::时间我用了5秒,自己修改成300秒就是5分钟了。
ping -n 5 127.1>nul
::下面的是关闭网页,不要这功能可以删除。
taskkill /f /t /im IEXPLORE.EXE
::重新打开网页
start "" "http://www.baidu.com"
goto ag

用任务计划吧

@start "" "%systemdrive%\Program Files\Internet Explorer\IEXPLORE.EXE" & ping -n 5 1