Keep the Jenkins Windows Service Running 24/7

How to Keep Jenkins Running 24/7 with Service Protector

Automatically restart the Jenkins Windows Service if it crashes or is accidentally shut down. Ensure that your integration environment achieves 100% uptime


Last Updated on October 5, 2026

Jenkins is an open-source continuous integration server written in Java. It installs and runs as a Windows Service:

That service gets you "start-at-boot" and basic crash protection but not much else. We'll show you how to make Jenkins much more resilient using our professional watchdog, Service Protector.


To keep the Jenkins Windows Service running 24x7:

  1. Download and install Service Protector, if necessary.

  2. Start Service Protector.

  3. Select Protector > Add to open the Add Protector window:

    Add Protector

  4. On the General tab, choose the Jenkins service in the Service to protect dropdown at the top.

    You'll notice a green circle on the left if the service is already running, as it was on our computer:

    Choose the Jenkins Windows Service

  5. Are you interested in monitoring Jenkins and detecting when it stops listening for TCP/IP requests? If so, we'll show you how to set up a health check to tell Service Protector when Jenkins has failed.

    1. Switch to the Monitor tab. Check the Whenever it fails a periodic sanity check box and click the Set button:

      Apache Windows Service: Add a sanity check

    2. In the Add Sanity Check window, select the Check that your service has open network connections option and click Next to proceed:

      Add a network connections sanity check

    3. Since Jenkins should be listening for network connections, check the Require at least one listening/server connection box.

      And because the TCP/IP connections are actually held by the Java process that jenkins.exe launches (thanks Process Explorer!), activate the Also check sub-processes option:

      Setup the check for a listening network connection

      Click Next to continue.

    4. On this page, tell Service Protector how often to check for the network connection. The default of every 5 minutes should be fine but you can check more frequently if you like.

      After you're done, click Next to move on:

      How often should Service Protector check Jenkins?

    5. And finally, confirm your settings:

      Confirm your sanity check settings

      If everything looks good, click Add to record your new sanity check and return to the Monitor tab.

  6. Click the Save button. In a couple of seconds, an entry for Jenkins will show up in Service Protector's window. Jenkins is already being monitored by Service Protector:

    Jenkins Windows Service: Protected

  7. That's it! Next time your computer boots, Jenkins will start as normal and Service Protector will begin monitoring the service to promptly restart it if it fails or stops for any reason.

    We encourage you to edit Jenkins in Service Protector and check out the many other settings that may be appropriate for your environment.

    For example, send an email when the service fails, restart Jenkins during the wee hours to keep performance snappy, recycle Jenkins if it hogs the CPU and much more.


Trouble protecting the Jenkins Windows Service?

  • From Service Protector, select Protector > Report Activity > Today to bring up an HTML report detailing the interaction between Service Protector and Jenkins.

  • Browse the Service Protector FAQ for answers to commonly asked questions and troubleshooting tips.

  • Contact us and we will be happy to help!