Link to home
Start Free TrialLog in
Avatar of sam15
sam15

asked on

How to not start web server after reboot


I have a two windows 2016 servers with two application servers using IIS and tomcat web servers running.

After I shut them down, if the machine is rebooted they come back up.

How can I shut them down with restarting with reboot? Is this some auto-startup change?

Also, is there a way to set them to start up on reboot if they were running or not run if they were in stopped mode before reboot?

thanks,


ASKER CERTIFIED SOLUTION
Avatar of Seth Simmons
Seth Simmons
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I would configure this per server.

Essentially have a text file in c: or whatever, then run a batch on startup.

If file exists netstart servicename.

This will allow you to set services to manual and they will only start if you want them to.
Avatar of sam15
sam15

ASKER

I assume startup will have to me either manual or automatic meaning "do not start on reboot" or "Start automatic on reboot".

There is no way to do this with basic windows configuration?

if service is running
restart it on reboot
else
do not restart it on reboot
end

As Seth pointed out. Both are controlled by a services.msc
You can change each service to manual from automatic/automatic delayed start.

You might be in search of a solution without a problem.

Servers commonly are expected to be operational on restart..

The change you are considering would  require additional intervention  to get it running.

Potentially, if you were to cluster the two hosta as a failover cluster, the web service and tomcat could be part of the cluster eesources.

Only the active node will have these services running only.