Quartz Scheduler in Web application

I am learning quartz and Have tried some samples which works in Console application. Now am trying in web aplications. Following is what I did.


<?xml version="1.0" encoding="UTF-8"?>
     <display-name> Quartz Initializer Servlet</display-name>


org.quartz.plugin.jobInitializer.class =    org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin
org.quartz.plugin.jobInitializer.fileNames = quartz-config.xml
org.quartz.plugin.jobInitializer.failOnFileNotFound = true
org.quartz.plugin.jobInitializer.scanInterval = 10
org.quartz.plugin.jobInitializer.wrapInUserTransaction = false

# Configuring ThreadPool
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 30
org.quartz.threadPool.threadPriority = 5


<?xml version="1.0" encoding="UTF-8"?>
xsi:schemaLocation="http://www.quartz-scheduler.org/xml/JobSchedulingData http://www.quartz-scheduler.org/xml/job_scheduling_data_1_8.xsd"

    <delete-jobs-in-group>*</delete-jobs-in-group>  <!-- clear all jobs in scheduler -->
    <delete-triggers-in-group>*</delete-triggers-in-group> <!-- clear all triggers in scheduler -->


            <repeat-count>-1</repeat-count> <!-- repeat forever  -->
            <repeat-interval>10000</repeat-interval>  <!--  every 10 seconds -->



import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.StatefulJob;

 public class KpubScheduler implements StatefulJob {

  protected static final Log log = LogFactory.getLog(KpubScheduler.class);  
  public void execute(JobExecutionContext context) throws JobExecutionException {
    try {
         System.out.println("Quartz Config..........");
         log.info("entering the quartz config");  

    } catch (Exception ex) {
        log.info("entering the quartz config");  


Now I have started the server. After it gets started, my KpubScheduler has to get invoked and I should get the log info's and Sysout's. But Nothing is happening. If I have a look at the log, its just giving this

Dec 29, 2010 8:21:37 PM org.apache.catalina.core.ApplicationContext log
INFO: QuartzInitializer: Scheduler has been started...
Dec 29, 2010 8:21:37 PM org.apache.catalina.core.ApplicationContext log
 INFO: QuartzInitializer: Storing the Quartz Scheduler Factory in the servlet context at key: org.quartz.impl.StdSchedulerFactory.KEY

What may be the problem?. Am I doing it right?.


it seems theoretically ok, but do you mean that the usage of this <pre-processing-commands /> causes maybe to be deleted your jobs? can you try without them?

my application seems like yours but i have no problem with Quartz.

Are you sure that you did configure your log levels correctly for KpubScheduler?

Need Your Help

How to sell a “Sharepoint Developer”?

asp.net sharepoint sharepoint-2007

I am working in a company with huge DotNet team. We currently have MOSS 2007 license which I assume is a costly one and just one administrator working/maintaining all Sharepoint stuff.

Two PHP Forms that Redirect to x/y URL on the same page

php forms url redirect if-statement

I am trying to create a 'simple' redirect for clients who use either Wordpress or Indexhibit to manage there sites.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.