Reputation: 35689
Is there any utility / maybe use window scheduler to auto restart "tomcat6 service" everyday? any guideliness on this?
My tomcat service is installed using javaservice.exe .
Upvotes: 2
Views: 10412
Reputation: 2052
window scheduler to auto restart "tomcat6 service"
1. Tomcat_start.bat
@echo off
net Start tomcat6
2. Tomcat_stop.bat
@echo off
net stop tomcat6
Reason to create two different bat
file is: give 1-5 min time to stop service completely otherwise service cannot start.
Scheduler Image :
As you can see in image create two different scheduler, one for stop and one for start. I have provided 15 min time between stop and start. you can give 3-5 min(this is minimum required time to stop service completely if any heavy load).
Note:
1. As you can see in image give Run with highest Privileges
checked true and also change Run Whether user is logged on or not
.
2. Set your bat
file in actions
tab and set time in Triggers
tab.
Upvotes: 3
Reputation: 2170
You can schedule a batch file with: net stop YourService net start YourService
Rod
Upvotes: 2