History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QUARTZ-565
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: James House
Reporter: HeeGu,Lee
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Quartz Scheduler

Example's job.xml has error in quartz 1.6.0

Created: 04/Mar/07 08:37 PM   Updated: 02/Apr/07 01:05 AM
Component/s: Example Programs
Affects Version/s: 1.6
Fix Version/s: 1.6.1


 Description  « Hide
I use quartz's cron function in my program.

And I was found wrong example in quartz 1.6.0's example.

Accouding to example 10's job.xml, cron setting is

=================================================
      <cron>
        <name>testTrigger1</name>
        <group>testJobs</group>
        <description>Test Trigger Number 1</description>
        <job-name>testJob1</job-name>
        <job-group>testJobs</job-group>
        <!--
<start-time>2003-12-17 2:15:00 pm</start-time>
        <end-time>2013-12-17 2:15:00 pm</end-time>
-->
        <cron-expression>0/15 * * ? * *</cron-expression>
        <!-- every 15 seconds... -->
      </cron>
=============================================

But, start-time and end-time tag's value is wrong.
quartz's job scheduling schema is http://www.opensymphony.com/quartz/xml/job_scheduling_data_1_5.xsd.
And schema tell me xsd:dateTime for start-time and end-time.

And xsd:dateTime 's specification url is http://www.w3.org/TR/xmlschema-2/#dateTime.
In this docs, dateTime format is '-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)?.

So, <start-time>2003-12-17 2:15:00 pm</start-time> must change to <start-time>2003-12-17T14:15:00</start-time>.

I want to fix this example file.

And one Question. Can I get useful description -and very detailed - doc to make job.xml in where?

 All   Comments   Change History      Sort Order:
Henri Yandell - [02/Apr/07 01:05 AM ]
When running the example (with the cron-expression commented out and the commented out times commented in), the commented out dates do appear to work:

[DEBUG] 01 Apr 10:52:53.596 PM main [org.apache.commons.digester.Digester]
[BeanPropertySetterRule]{quartz/job/trigger/cron/end-time} Set org.quartz.CronTrigger property endTime with text 2017-12-13

 2:15:00 pm

[DEBUG] 01 Apr 10:52:53.596 PM main [org.apache.commons.beanutils.PropertyUtils]
setSimpleProperty: Invoking method public void org.quartz.CronTrigger.setEndTime(java.util.Date) with value Sun Dec 17 14:15:00 PST 2013 (class java.util.Date)

Though an exception of:

org.quartz.SchedulerException: Based on configured schedule, the given trigger will never fire.
    at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:750)
    at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:266)

is thrown, which is odd.

Switching to your suggested text, things are the same. So making the above change to the example doesn't cause any damage. Looking at the XSD spec, I agree that the time literal should be as you suggest.

As for the question - the user/developer forum would be the best place for that.

Henri Yandell - [02/Apr/07 01:05 AM ]
 svn ci -m "Fixing the time so it is in correct xsd:dateTime format as per QUARTZ-565" examples/example10/jobs.xml

Sending examples/example10/jobs.xml
Transmitting file data .
Committed revision 688.

(and r687 on the 1.6 branch)