Using Spring.NET and Quartz.NET Job Scheduler

In this tutorial we are going to demonstrate how to scheddule repetitive jobs using and Quartz.

To follow this articles you have to install visual studio and reference spring.core and spring.scheduler.quartz  libraries. We will use nuget package gallery to install  libraries

1. Using nuget package gallery with visual studio 2012

1. Create a console project using visual studio

  • Expand your project and Right click  references
  • Click Manage nuget Packages


  • Click Online and Search for spring , localize spring.core and install it
  • Click Online and Search for spring , localize spring.scheduling.quartz and install


Expand references and open packages.config folder to verify that libraries and dependencies are installed4

2. Scheduling repeatitive jobs

Create a class MyJob.cs and put its content as follow


  • Create a class and name it JobService.  note that its  A ‘plain’ object (no inheritance of any infrastructure base class) whose method will  be invoked by Quartz.


3. Configuring Spring IoC

Add a spring-objects.xml file and put its content as follow

7 8

Update your programm class as folow to configure and run Job


Thats all Press F5 to run application


the result is we have two jobs :

one running  every 20 second of minute  and another running repeatedly every 5 seconds


I'm a microsoft most valuable professional (MVP) .NET Architect and Technical Expert skills located in Paris (FRANCE). The purpose of this blog is mainly to post general .NET tips and tricks, Gora LEYE

Support us

BMC logoBuy me a coffee