Thursday, June 21, 2012
Automation made easy
“Quartz.NET is a full-featured, open source job scheduling system that can be used from smallest apps to large scale enterprise systems”
I’ve supplied a very basic sample solution comprising of a console and MVC project. The console application can be run manually or installed as a windows service, and the MVC application is to demonstrate the crystal quartz interface which allows you to control the quartz jobs you have set up in the service.
But, like I said, this is just a very basic example.
With Quartz.NET you have the flexibility to set up 3 different job stores (list of job configurations with triggers and parameters you want to be run) namely:
1. In Code
2. Xml File
In Quartz.NET you can clearly define exactly when you would like your jobs to be scheduled, from the simplest of triggers to the most complex facilitating built in simple triggers, calendars and cron expressions (handy site to create cron expressions). You can specify if the job should be set to recover (re-run) in the event of an unexpected error along with other job attributes.
Service Code Snippet:
MVC Crystal Quartz Snippet:
Windows service installation:
The windows service can be installed with installutil typically found in C:\Windows\Microsoft.NET\Framework\v2.0.50727 as follows.
1. Run the command prompt as administrator.
2. "cd" to where your built console application exists.
3. installutil QuartzSample.exe to install the service.
Afterthe service is installed, you can just run the MVC application to check out the crystal quartz panel.
This was just a quick overview of Quartz.NET, but from my own experience I’ve found Quartz.NET to be very easy to use, reliable and robust.
I hope this has post has at least wet your appetite to check out Quartz.NET in more detail.
Till next time..