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

Key: QUARTZ-673
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: James House
Reporter: jdavidb
Votes: 1
Watchers: 2
Operations

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

CronTrigger: Docs are not clear about limit - Cannot specify multiple days of the week if a week number is specified

Created: 11/Jun/08 10:44 AM   Updated: 02/Aug/08 03:41 PM
Component/s: Triggers
Affects Version/s: 1.6, 1.6.1
Fix Version/s: None

Environment: JDK 1.5.0_12


 Description  « Hide
If the day-of-week in a CronExpression contains a week number, the week number causes all but the first DOW to be ignored, and applies itself to that first DOW regardless of which DOW it was specified for. You cannot specify a CronExpression with a DOW for multiple weeks of the month (e.g., first and third Sunday of the month); you cannot specify a CronExpression with multiple DOWs if you have a week number. The following expressions appear valid according to the docs, but do not work:

0 0 8 ? * 1#1,1#3
Should be first and third Sunday of the month
Results in only third Sunday of the month

0 0 8 ? * MON,WED,FRI#3
Should be every Monday and Wednesday, plus third Friday of the month
Results in third Monday of the month, no Wednesdays or Fridays at all

0 0 8 ? * MON#1,THU#2
Should be first Monday of the month, second Thursday
Results in second Monday of the month

These results were obtained by examining the Date objects returned by TriggerUtils.computeFireTimes()

I've also reported this on the forum:
http://forums.opensymphony.com/thread.jspa?threadID=360264

 All   Comments   Change History      Sort Order:
James House - [20/Jun/08 08:48 AM ]

It's likely that the docs will be updated to make it clear this isn't supported, and probably do some checking for the case and throw a ParseException when the expression is defined such a way.... this is because supporting this will be a very significant amount of work.

James House - [02/Aug/08 03:41 PM ]
docs updated.