I wrote another embeddable web console (the third so far, the others being the NHibernate and the Boo console). This one is a manager for the Quartz.NET job scheduler.
Even though ASP.NET is not the perfect environment to run scheduled jobs, I do use Quartz.NET sometimes to schedule some non-critical maintenance jobs in web applications. And sometimes I need to pause or manually launch a job. So I went looking for a web interface and found two (quartznet-admin and Quartz.Web) but they're full ASP.NET MVC apps, not meant to be embeddable. So I built my own:
QuartzNetWebConsole
Project homepage
Downloads
Here are some screenshots showing its features, with a sample application:
Index / Dashboard:
Triggers per group (the jobs per group page is very similar):
Scheduler log:
Log RSS:
Setup:
- Reference QuartzNetWebConsole.dll in your application
- Add it to your httpHandlers in your web.config:
<add verb="*" path="quartz/*" validate="false" type="QuartzNetWebConsole.ControllerFactory, QuartzNetWebConsole"/>
- Configure it with QuartzNetWebConsole.Setup in your Application_Start(), e.g:
protected void Application_Start(object sender, EventArgs e) { Quartz.IScheduler scheduler = BuildQuartzScheduler(); QuartzNetWebConsole.Setup.Scheduler = () => scheduler; ... } - Optionally, add a logger (any class implementing QuartzNetWebConsole.ILogger). An in-memory logger is provided:
var partialQuartzConsoleUrl = string.Format("http://{0}:{1}/quartz/", Context.Request.Url.Host, Context.Request.Url.Port); // quartz web console url, required for RSS QuartzNetWebConsole.Setup.Logger = new QuartzNetWebConsole.MemoryLogger(1000, partialQuartzConsoleUrl); // stores 1000 log entries
As usual, it's up to you to secure it as you see fit.
Crystal Quartz
After I wrote this whole thing, I found another open source project (written a couple of months ago, it seems) that does about 80% of I needed! Apparently my google-fu failed me. Anyway, this project is called Crystal Quartz and was created by Guryanov Evgeniy. As far as I know, it hasn't been released and nobody has blogged about it, in fact the only reference I found was this message. I got the source code and gave it a try, and it looks good. Here are the screenshots:
Index:
Job detail:
Conclusions
So there you go, now you have two embeddable web managers for Quartz.NET to choose from.
One of the cool things about Quartz.NET is that it's easily remotable, so you can also use these managers with a Quartz.NET Windows Service, just by telling the web IScheduler to connect to a remote scheduler instance.
2 comments:
Thanks for this app. I've added it to my application and am testing it out. To the setup steps, could you please add that you need to ignore the quartz route like so:
routes.IgnoreRoute("quartz/{*pathInfo}");
Hey Thanks, Your site has been a lot of help setting up quartz!
Post a Comment