Quartz.NET-Based Job Scheduler Service?

63 views
Skip to first unread message

christo...@gmail.com

unread,
Jan 31, 2008, 3:57:33 AM1/31/08
to Quartz.NET
I have been following the development of Quartz.NET for some time.
There is quite some functionality, and also (thankfully) a samples
project shipping.

What I am kind of missing (or might have missed) is a "shrink-wrapped"
scheduler service for Windows. Where you simple register your jobs in
the XML configuration, and you are done - your jobs run as defined.
Without me having to write the job scheduler service.

Did I simply miss this, is this planned, or is it intentional that
everyone should implement a job scheduler every time?

Chris

Marko Lahma

unread,
Jan 31, 2008, 4:17:13 AM1/31/08
to quar...@googlegroups.com
Hi Chris,

There's an open issue: http://jira.opensymphony.com/browse/QRTZNET-40
, which is about console but could be a service as well. I'm not sure
whether it should be a separate Cookbook page on the website with
these commonly needed things on a copy-paste form. Introducing two new
visual studio projects for couple of small code files doesn't seem
right to me.

I'm open to all ideas,

-Marko

On Jan 31, 2008 10:57 AM, christo...@gmail.com

Christoph Wille

unread,
Jan 31, 2008, 5:20:33 AM1/31/08
to quar...@googlegroups.com
How about this:

* add a Windows service based on the Quartz.NET library to the project
* provide it as a separate binary download w install instructions (or
setup) for those that need a .NET based scheduler service
* make it so that it can be installed with different service names (so
project A can ship its preconfigured scheduler, project B do the same
and both operate in separate process spaces). That way installation
and usage is painless.

What you get from this is additional visibility for the project
because lots of people are looking for easy scheduling solutions, and
having a supported service built by the library team surely builds
credibility for the solution.

Chris

(I am the PM of SharpDevelop, however, this inquiry is unrelated to our project)

Marko Lahma

unread,
Jan 31, 2008, 5:36:35 AM1/31/08
to quar...@googlegroups.com
More I think about this I'm leaning towards code tree reorganization.
As code base grows the current solutions is no longer very
maintainable and does not separate different modules. So I think I
need to go the "standard" way and separate three distinct modules:

* Quartz
* Examples
* Tests

For most of people this is naturally common sense as this structure is
being used in many projects. In examples directory we can have the old
Quartz.Examples and add Quartz.WindowsService which will contain the
needed functionality. I'm not sure whether we need command line
version. If Windows service will come in compiled form in distribution
I think that will solve the issue. Examples and service will come part
of a new solution file and we'll then have Quartz.sln (all projects),
Quartz.Core.sln (just Quartz and tests) and Quartz.Examples.sln.
Hopefully we will have Quartz web app console (ASP.NET MVC) also like
Java Quartz doe in Quartz.Web.sln some day.

Opinions?

-Marko

Christoph Wille

unread,
Jan 31, 2008, 5:44:16 AM1/31/08
to quar...@googlegroups.com
Sounds good to me to split it into core, samples and tests. (we have a
similar source tree in SharpDevelop) However, maybe split the service
out into a separate directory to clearly show that it is not of sample
quality but production quality. And that it is considered a separate
entity to the library.

Chris

Marko Lahma

unread,
Jan 31, 2008, 6:08:40 AM1/31/08
to quar...@googlegroups.com
I've updated the issue accordingly to the discussion,
http://jira.opensymphony.com/browse/QRTZNET-40 .

Chris thanks for your input on the matter!

-Marko

Christoph Wille

unread,
Feb 1, 2008, 8:52:27 AM2/1/08
to quar...@googlegroups.com
Please forgive my ignorance about the existing XML format - I just
want to air a few comparisons. I have two job schedulers that I use:
one for CommunityServer, one for Countersoft Gemini (non-extensible).

CS has a nice way of specifying jobs (I stripped the configuration
down to make it more readable):

<Tasks>
<Modules>
<add name="CSTaskModule"
type="CommunityServer.Components.CSTaskModule,
CommunityServer.Components" />
</Modules>
<Threads>
<Thread minutes="15">
<task name = "SiteStatisticsUpdates" type =
"CommunityServer.Components.SiteStatisticsJob,
CommunityServer.Components" enabled = "true" enableShutDown = "false"
/>
</Thread>
<Thread minutes="5">
<task name = "Emails" type =
"CommunityServer.MailRoom.Components.EmailJob,
CommunityServer.MailGateway.MailRoom" enabled = "true" enableShutDown
= "false" failureInterval = "1" numberOfTries = "10" />
</Thread>
<Thread minutes="15">
<task name = "FeedUpdater" type =
"CommunityServer.Reader.Components.FeedUpdater,
CommunityServer.Reader" enabled = "true" enableShutDown = "true" />
</Thread>
</Threads>
</Tasks>

Jobs are grouped by times they need to be run, which is (for my
purposes) a very good way of organizing repeating tasks (as compared
to having a start time & repeat interval on the job).

Chris

Marko Lahma

unread,
Feb 2, 2008, 6:30:22 AM2/2/08
to quar...@googlegroups.com
Yes, Quartz can be quite verbose when it comes to XML. In the future
it would be good to at least convert element based information to
attribute based information and consider new features as this grouping
of jobs that would create triggers under the hood. This something that
I prefer not to change so near the 1.0 as it's a big breaking change.

I've also fixed a small issue,
http://jira.opensymphony.com/browse/QRTZNET-90 (you can argue whether
it's an improvement or a bug fix). You don't restate the job name and
group in trigger anymore (I think this is old burden from Java
version's Digester based implementation, should have examined it more
carefully). So now you can have your "every five minutes" trigger
described as "short" as:


<job>
<job-detail>
<name>noOp</name>
<group>noOpGroup</group>
<job-type>Quartz.Job.NoOpJob, Quartz</job-type>
</job-detail>

<trigger>
<cron>
<name>everyFiveMinutes</name>
<group>cronTriggers</group>
<cron-expression>* 0/5 * * * ?</cron-expression>
</cron>
</trigger>
</job>


If you are not using latest from the trunk, you also need to set
jobName and jobGrop for the trigger. Yes, it is verbose, too verbose
:-)

-Marko

Marko Lahma

unread,
Mar 27, 2008, 1:49:59 PM3/27/08
to quar...@googlegroups.com
Hi all,

I've committed first version of the scheduler service / console server
to Quartz.NET Subversion trunk. It would be super helpful if someone
on the list would have some time to give it a whirl. Currently I think
that I have already created solution that removes the need for repeat
the basic server coding process but solution is still really bare
bones. So what features would you expect from this server besides the
basic XML based configuration?

Cheers,

-Marko

Christoph Wille

unread,
Mar 28, 2008, 5:18:42 AM3/28/08
to quar...@googlegroups.com
Let's look at a scenario: A project needs a scheduler. They learn
about Quartz.NET, and because the scheduler is just one of many
features for their application, they use the scheduler service "as
is". Now this application is deployed. But the machines already have
application installed where the developers took the same approach -
and now you have clash in service names.

So a very useful would be that the schedulersvc.exe "learns" its
service name from schedulersvc.exe.config. That way it would be
super-easy to have multiple schedulers from multiple applications on
the same machine without clashes.

Chris

Christoph Wille

unread,
Mar 28, 2008, 11:54:21 AM3/28/08
to quar...@googlegroups.com
Another thing that came to mind when discusssing about CruiseControl.NET:

CCNET ships with a service exe as well as a cmd line exe for the build
agent. The former is the "real" service, the latter is a command line
application for interactively debugging the build configuration. I
think this feature would be very valuable to copy.

Chris

dip...@gmail.com

unread,
Apr 3, 2008, 7:52:26 AM4/3/08
to Quartz.NET

Funny, i'm already implementing such a thing.
I've just joined this group, to see if a problem can be solved:

My service runs, and I want to update its jobs externally.

So, it has to either FileSystemWatch the xml file, reload everything
and restart, reconfigure [ do such a thing exist in quartz? ]

Or, it can have some HTTP console where i can remotely control it..
[ guess i'd need to implement it ]

What do you guys think?

I'll check out the service from SVN, and compare it to the one i'm
making. If theres something to be added from my solution I'd
let you guys know.

thanks!

Marko Lahma

unread,
Apr 3, 2008, 8:07:27 AM4/3/08
to quar...@googlegroups.com
Hi,

easiest way to administer a running scheduler is to export it via
remoting. Current Subversion trunk exports it (see the App.config).

-Marko

Reply all
Reply to author
Forward
0 new messages