CrystalQuartz for Quartz.Net 2

Quartz.Net is an awesome and robust framework for scheduling jobs within .Net.  It is based on the very popular Quartz for Java.

Once you start using Quartz.Net very quickly you will want some sort of dashboard interface where you can view all the jobs that are running and other metrics.

Well, before you go developing your own there are already a few out there.  While most are full ASP.Net WebForms or MVC apps there are a couple of axd dashboards which allow you to easily embed them in your website with only a few changes to your Web.Config.  Take a look at CrystalQuartz or QuartzNetWebConsole.

After looking at both I chose CrystalQuartz because it seemed to be easier to implement with  my particular site and I liked the dashboard a little better.  I encourage you to look at the latest version of both and make your own decision.

Unfortunately I was using the beta version 2 of Quartz.net.  This is a great version and if you are just starting out I recommend it because it is much more intuitive than the current 1.0 release. 

That being said, CrystalQuartz (nor QuartzNetWebConsole) is not compatible with Quartz.Net v2.  So I made a few tweaks to the code and now it works great.

Feel free to download my version here:

CrystalQuartz Compatible with Quarts.Net v2.zip

I’ve contacted the CrystalQuartz team about adding my additions to their project but I have not heard anything back.  I’d love to fold my changes into their codebase so that it can be properly maintained and help others out.  However, in the mean time I’ve received a few requests for my changes so I’m making them available here.  I am not planning on maintaining this so if there are breaking changes as Quartz.Net v2 nears production then I may or may not have the time to update my copy of CrystalQuartz.  I do expect the CrystalQuartz team to come out with a v2 version that works with Quartz.Net when it is finally released.

Enjoy!

About Author

Matt Penner

5 thoughts on “CrystalQuartz for Quartz.Net 2

  1. Hi

    Many thanks been looking for something like this for a while.
    However, I seem to have a problem connecting to the Quartz Server v2 (beta) on my local machine, running the CrystalQuartz client on the local machine as well.

    Get :-
    Error communicating with remote scheduler
    Return argument has an invalid type

    Hope you can point me in the right direction
    Regards
    Jonsie

    My client code is quite happily sending jobs to the server.

    string quartzServer = “tcp://localhost:555/QuartzScheduler”;

    NameValueCollection properties = new NameValueCollection();
    properties[“quartz.scheduler.instanceName”] = “RemoteClient”;

    // set thread pool info
    properties[“quartz.threadPool.type”] = “Quartz.Simpl.SimpleThreadPool, Quartz”;
    properties[“quartz.threadPool.threadCount”] = “5”;
    properties[“quartz.threadPool.threadPriority”] = “Normal”;

    // set remoting expoter
    if (isRemoteService)
    {
    properties[“quartz.scheduler.proxy”] = “true”;
    properties[“quartz.scheduler.proxy.address”] = quartzServer;
    }
    // First we must get a reference to a scheduler
    try
    {
    ISchedulerFactory sf = new StdSchedulerFactory(properties);
    sched = sf.GetScheduler();
    if (!isRemoteService)
    {
    sched.Start();
    }

    }

  2. I know this is an old post, however I was just trying out CrystalQuartz.

    As far as I could see, it is still not using Quartz.Net 2.

    NOTE: when using CrystalQuartz (CQ) the Quartz.dll MUST be the same on both the server and client.

    When I initially setup CQ I got the error message:
    “Error communicating with remote scheduler. Return argument has an invalid type”

    This was because CQ used Quartz 1 and my server used Quartz 2.

    Updating to use the CQ code from this page I got the error:
    “Could not load file or assembly ‘Quartz, Version=2.0.1.100, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)”

    This was because the Quartz library on the server was a later version than the code here.

    Using the exact same dll file for both rectified my issues.

    • Hai Mr.David Grinberg… Did you found solution for the below one,

      “Could not load file or assembly ‘Quartz, Version=2.0.1.100, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)”

      My Quartz library version is Version=2.2.3.400. but My CrystalQuartz.Web library (CrystalQuartzPanel.axd) referring Quartz, Version=2.0.1.100. That’s why i am getting above error.

      Let me know your suggestion…

Leave a Reply

Your email address will not be published. Required fields are marked *