Keep Quartz.NET Windows Service running 24/7 with Service Protector

How to Keep the Quartz.NET Windows Service Running 24/7 with Service Protector

Automatically restart the Quartz Server if it stops for any reason. Ensure that your ASP.NET jobs are always executed when scheduled!

Quartz.NET is an enterprise-ready scheduler derived from the java-based Quartz package. The standalone server component (Quartz.Server.exe) accepts, schedules and executes jobs on behalf of any application, but it is typically found supporting ASP.NET applications.

One of our customers has configured the Quartz.NET server to run as a windows service for robust, unattended operation:

To manage the Quartz.NET windows service with Service Protector:

  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, in the Service to protect field, choose the Quartz.NET windows service, named Quartz Server. You will notice a green circle to the left of the entry if Quartz is already running, as was the case on our server.

    Quartz.NET Windows Service: General Tab

  5. Service Protector offers many settings to help you recover from problems with Quartz (like memory leaks, CPU hogging, etc.) but let's ignore those for now and click the Save button. In a few seconds, an entry for Quartz Server will show up in the Service Protector window:

    Quartz.NET Windows Service: Created

    If Quartz is running, click on the green circle in the "Service State" column to pop up a tooltip showing a few details of the Quartz service:

    Quartz.NET Windows Service: Information Tooltip

  6. At this point, Service Protector is not yet watching Quartz. To start protection, choose Protector > Start "Quartz Server". The shield icon will go to green to indicate that Quartz.NET is being protected:

    Quartz.NET Windows Service: Running

    Click on the green shield to see when protection started:

    Quartz.NET Windows Service: Running Information

  7. That's it! Next time your computer boots, Quartz.NET Server will start and Service Protector will begin monitoring the service to quickly restart it if it stops for any reason.

    And now that you have gone through the basics, please feel free to edit Quartz in Service Protector and check out the many other settings that may help the server to operate smoothly. For example, send an email when the service fails, setup a failure detection script that periodically checks the Quartz TCP/IP port, and much more.

Trouble protecting the Quartz.NET Windows Service?