Service Recovery Windows 2003 - what about when service fails to start after reboot?

If you set service to restart after failure I guess this applies to FAILURE only?

i.e. Not if service fails to start after server is booted?

Is there any way to do this? At the moment, our server reboots (planned) every night but sometimes services fail to start.
paul williamsAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Rich WeisslerConnect With a Mentor Professional Troublemaker^h^h^h^h^hshooterCommented:
Is there any way to do this?

You can write a batch file, which checks to see if the service is running, and if it isn't, attempts to start it.  So do 'net start' from the command line, and find the name for your service.
Then have the batch file perform a:
net start | find /i "[exact name of service found above]"
if errorlevel==1 net start "[exact name of service you want to make certain is running]"

You can then use "Scheduled Tasks" to run the batch file, scheduled to run daily at a time after the server should have recovered from it's reboot.  (And if you like, you can use the Advanced Schedule Options to repeatedly run the task... it'll only attempt to start the service if it doesn't find it in the list of running tasks.)
0
 
QlemoDeveloperCommented:
If it are a few, specific services, set them to Delayed start. Often start failures on boot are caused by dependant services not running on time.
0
 
Rich WeisslerProfessional Troublemaker^h^h^h^h^hshooterCommented:
I believe the option to set services to 'Delayed Start' was added to Windows Server 2008.  That said, if you can identify a dependent service, you can delay the start of your problematic service(s) by setting a dependency.
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
QlemoDeveloperCommented:
Sorry, that is correct. Didn't see "Windows 2003". So "Delayed Start" is not available.
0
 
paul williamsAuthor Commented:
For now, we're using a batch file and scheduled job.
0
 
paul williamsAuthor Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for paul williams's comment #a40579608

for the following reason:

This is the only way under 2003.
0
 
Rich WeisslerProfessional Troublemaker^h^h^h^h^hshooterCommented:
I believe this is exactly what was suggested under the first comment (#40578962).
0
 
paul williamsAuthor Commented:
sorry you are correct.
0
 
paul williamsAuthor Commented:
Sorry I missed this one. Excellent idea.
0
All Courses

From novice to tech pro — start learning today.