Solved

Creating A Batch Scripts That Restarts Itself Automatically at Regular Predefined Intervals

Posted on 2008-10-08
2
401 Views
Last Modified: 2010-04-16
I currently have a batch script that polls a "service" every five (5) minutes. At times, the "service" that is being polls takes longer to respond for various reasons. The polling batch script hangs as a result. However, simply restarting the scrip, by closing one command window and running the script in a new command window resolves the issue.  

Therefore, I wish to achieve one of the following outcomes:
1.)  Append code to the existing batch script to restart itself at a predefined interval that I can easily modify
2.)  Write a separate script that closes and re-opens the polling script at a predefined interval that I can easily modify

Thank you in advance,
nss39759
0
Comment
Question by:nss39759
2 Comments
 
LVL 63

Accepted Solution

by:
SysExpert earned 500 total points
ID: 22674006
Run it as a scheduled task.

 
I hope this helps !
0
 
LVL 68

Expert Comment

by:Qlemo
ID: 22674028
I would use a Scheduled Task running every 5 min. for polling, and a limitation to 5 min. That way, if the job hangs, it will be killed and restarted automatically.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
Learn about cloud computing and its benefits for small business owners.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now