What Is Quartz
Subject:   Problem with using Quartz
Date:   2005-10-25 08:09:05
From:   bonzai
Hi there,
I've read this article and am trying to deploy a simple web app to test Quartz. I've got a simple Java class that implements org.quartz.Job. All it does is send an email. I would like to take the XML approach for setting up the scheduler. Following your example, I've created a myjob.xml. My myjob.xml looks like the following:

?xml version='1.0' encoding='utf-8'?>
<description> A job that sends mail
<job-data-map allows-transient-data="true">
<value>Testing Quartz</value>

<!-- Other neccessary Job parameters here -->


<start-time>2005-10-25 4:38:00 PM</start-time>
<end-time>2005-10-25 4:40:00 PM</end-time>

And in my, I've added configuration for plugins: as follows:

org.quartz.plugin.triggHistory.class = org.quartz.plugins.history.LoggingTriggerHistoryPlugin
org.quartz.plugin.triggHistory.triggerFiredMessage = Trigger {1}.{0} fired job {6}.{5} at: {4, date, HH:mm:ss MM/dd/yyyy}
org.quartz.plugin.triggHistory.triggerCompleteMessage = Trigger {1}.{0} completed firing job {6}.{5} at {4, date, HH:mm:ss MM/dd/yyyy} with resulting trigger instruction code: {9}

org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.JobInitializationPlugin
org.quartz.plugin.jobInitializer.fileName = \myjob.xml
org.quartz.plugin.jobInitializer.overWriteExistingJobs = false
org.quartz.plugin.jobInitializer.failOnFileNotFound = true

org.quartz.plugin.shutdownhook.class =
org.quartz.plugin.shutdownhook.cleanShutdown = true

I can successfully build and deploy this simple web app. But nothing happens, nor did I get any error messages. I have a few questions:

1. Must I store both the file and myjob.xml under /WEB-INF/classes?

2. Is my declaration for "org.quartz.plugin.jobInitializer.fileName" field in my correct? (If the path is in point 1)

3. Is it correct that I must give the full path to my send mail Java class under <job-class></job-class>
in myjob.xml?

4. If my settings and paths are correct, the scheduler should be able to read the job and the trigger,and then send email in the background, correct?

If my info is too vague, please kindly let me know. Also, if you could point me to any tips on debugging this, I'd really appreciate it.

Thanks in advance.

1 to 2 of 2
  1. Problem with using Quartz
    2006-11-28 23:16:27  Anns [View]

    • Problem with using Quartz
      2006-12-12 05:30:58  motivation [View]

  2. Problem with using Quartz
    2005-10-25 11:11:24  Chuck Cavaness | O'Reilly Author [View]

    • Problem with using Quartz
      2005-10-26 00:36:47  bonzai [View]

      • Problem with using Quartz
        2007-03-26 22:09:13  Hapi [View]

      • Problem with using Quartz
        2006-12-09 14:00:28  tsmets [View]

1 to 2 of 2