Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
92 views
in Technique[技术] by (71.8m points)

How to delay the start of a specific service in Windows Services?

I would like to delay the automatic start of a specific service, my tomcat client application here, that needs to wait few minutes before being launched so that another machine have enough time to start its own service before (database server here).

Is there any parameter for this in Windows server 2016?

question from:https://stackoverflow.com/questions/65861963/how-to-delay-the-start-of-a-specific-service-in-windows-services

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Yes, this can be done for a specific service.

You need to :

  1. First set your tomcat application Startup Type to "Automatic(Delayed Start)" in Services first.

2.Go to your registry and add a registry key named “AutoStartDelay” with type “DWORD (32-bit)” in below location:

HKLMSYSTEMCurrentControlSetservices<service name>AutoStartDelay

3.Modify the value data of AutoStartDelay with decimal. The value indicated is in seconds. For example, the following is for 2 minutes of delay : Configuration of the key in the registry

4.Save the change in Registry.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...