Installing Quart.Net 2.0 Beta 1 as a Windows Service
Now that there is an official beta release of Quartz.Net 2, I thought it would be a good idea to go through the installation process and describe it step by step. Before we get started I’d like to point out that this post was written using Windows 7, so the screenshots may not match exactly what you see if you are on a different version.
I will be unzipping the file to c:\quartznet2 for this article. Once you’ve downloaded and unpacked the files, you should have the following directory structure:
Now that we have a command prompt, let’s try starting the Quartz.Net server. To do this, simply run Quartz.Server.exe by typing it into the command prompt.
If nothing happens, then you probably forgot to unblock the files you downloaded. Go back to Step 1 and start over. If everything is well, you will see some output in the command prompt. This means Quartz.Net is running and that the sample job that is configured out of the box is running correctly.
You may also get a firewall warning window, similar to this one:
This is because by default the scheduler exposes a remoting interface that allows you to interact with it. If you wish to enable access to remoting, then go ahead and click allow access. otherwise, click cancel. You’ll have to configure the firewall manually later if you wish to enable remoting access on the scheduler.
Press CTRL-C to stop the scheduler.
Now type services.msc in the command prompt to open the services administration window. There you should see the quartz service installed as “Quartz Server” with automatic startup and running under the Local System account.
You should now be able to start and stop the service through the administration window.
Step 1: Download and Unpack the Binaries
The latest Quartz.Net 2.0 binaries are available from Sourceforge, here. Download the zip file and unpack the contents to a folder. If you are using Windows 7, be sure to unblock the downloaded zip file before extracting the files. This is done by right clicking on the downloaded file and clicking on the unblock button BEFORE unzipping the file.I will be unzipping the file to c:\quartznet2 for this article. Once you’ve downloaded and unpacked the files, you should have the following directory structure:
Step 2: Select the Appropriate Version
The beta 1 distribution provides binaries for the 3.5 and 4.0 versions of the .Net framework. Select the appropriate folder for your version from the following:Step 3: Sanity Check
Before installing Quartz.Net 2 as a service, let’s check that everything is working properly. I’m running version 4.0 of the framework so I will open a command prompt as Administrator in the 4.0 folder. Note: If you don’t open the command prompt as administrator, you will get no error messages or UAC prompts. The installation will simply fail.Now that we have a command prompt, let’s try starting the Quartz.Net server. To do this, simply run Quartz.Server.exe by typing it into the command prompt.
If nothing happens, then you probably forgot to unblock the files you downloaded. Go back to Step 1 and start over. If everything is well, you will see some output in the command prompt. This means Quartz.Net is running and that the sample job that is configured out of the box is running correctly.
You may also get a firewall warning window, similar to this one:
This is because by default the scheduler exposes a remoting interface that allows you to interact with it. If you wish to enable access to remoting, then go ahead and click allow access. otherwise, click cancel. You’ll have to configure the firewall manually later if you wish to enable remoting access on the scheduler.
Press CTRL-C to stop the scheduler.
Step 4: Installing the Service
At this point you should be quite confident that the base distribution will work once installed as a windows service. Now it’s time to install the service. To do this, type Quartz.Server.exe install in the command prompt. If all goes well, you should see the following in your command prompt.Now type services.msc in the command prompt to open the services administration window. There you should see the quartz service installed as “Quartz Server” with automatic startup and running under the Local System account.
You should now be able to start and stop the service through the administration window.