Showing items from IJobFactory

Creating a Custom Quartz.Net JobFactory

In this post we’ll walk through the creation of a custom Quartz.Net JobFactory that uses dependency injection to pass dependencies to our jobs.

We’ll be using Castle Windsor for this example, but you can use any dependency injection framework you want.

We discussed the Qartz.Net IJobFactory interface in detail previously, so read that first if you haven’t yet. At this point I’ll assume you’re familiar with that interface, so I’ll move on directly to implementing the custom Quartz.Net job factory. Here is the custom JobFactory using Castle Windsor.

Continue Reading

Configuring Quartz.Net To Use A Custom Job Factory

In an earlier post we covered what Quartz.Net job factories are and what they’re used for. We also went over the job factories that are included in the Quartz.Net distribution. For this post we’ll cover how to configure the Quartz.Net scheduler so that it uses the job factory we want.

To demonstrate how this is done we’ll modify the quartz.config file and tell Quartz.Net to use a PropertySettingJobFactory instead of the default SimpleJobFactory.

Continue Reading

Quartz.Net Job Factories

In my previous post we talked about the IJobFactory interface in detail. Today we will look at the 2 job factories that are included in the Quartz.Net distribution.

SimpleJobFactory

We will look at the SimpleJobFacotry first, since it is the base class used by the other job factory. This is a pretty simple implementation, so let’s look at the source code and talk about it in detail. Here is the source code for the NewJob method:

Continue Reading

Quartz.Net IJobFactory Interface

The Quartz.Net scheduler implements the factory method pattern to create the jobs that will be executed. Job factories are responsible for producing job instances. When you download the Quartz.Net distribution you get 2 different job factories. Today we will look at the IJobFactory interface in detail. In a later post we’ll look at the job factories that are included in the Quartz.Net distribution.

Continue Reading