绿色版tomcat隔断时间自动重启

1 先检查下是否在环境变量下配置了JAVA_HOME(这个是必须配置的,否则报错)

2 编写tomcat6.vbs文件内容如下【转的】:

on error resume Next
Dim a  
a = True
set WshShell = WScript.CreateObject( "WScript.Shell")
Do While a
WshShell.Run( "shutdown.bat")  
WScript.Sleep(1000)  
WshShell.Run( "startup.bat")  
WScript.Sleep(1000*10)   ---设置重启的时间间隔
loop

编写完成后将其放到bin下,或者放到其他的目录下也行,记得修改对应的内容,双击运行即可【附件中的tomcat就是配置好的】

猜你喜欢

转载自helloworlda.iteye.com/blog/1111082