
|
If you were logged in you would be able to see more operations.
|
|
|
|
|
| Component/s: |
Core
|
| Affects Version/s: |
None
|
| Fix Version/s: |
1.5.2
|
|
Okay, I created this based on ideas I got on the forum ( http://forums.opensymphony.com/click.jspa?searchID=131303&messageID=15999, http://forums.opensymphony.com/thread.jspa?messageID=10987⫫).
The first new class, CronExpression, is just an externalization of the Cron code in CronTrigger, and thus, I don't really consider any of it my own work (the @author tags point out my contribution as simple refactoring of the code). Also, as a side note, since CronTrigger doesn't really provide 'C' character support (should it really even be in the docs?), I have commented it out in the javadocs for CronExpression. See the various public methods for more information on this. I've tried to javadoc everything fairly well.
The second class was the real impetus behind this code, and it defines a new org.quartz.Calendar, called CronCalendar. This allows users to build a calendar using cron expressions to define the excluded times for any trigger. This could be very powerful when used in conjunction with a CronTrigger, although I think the most common use would be with SimpleTriggers. In any case, I thought it was a cool idea, so I thought I'd see if I could make it work.
Note, I did not remove CronTrigger's cron-related code, because I don't know how that would affect the persistence designs. But the changes shouldn't be too hard for the trigger itself.
|
|
Description
|
Okay, I created this based on ideas I got on the forum ( http://forums.opensymphony.com/click.jspa?searchID=131303&messageID=15999, http://forums.opensymphony.com/thread.jspa?messageID=10987⫫).
The first new class, CronExpression, is just an externalization of the Cron code in CronTrigger, and thus, I don't really consider any of it my own work (the @author tags point out my contribution as simple refactoring of the code). Also, as a side note, since CronTrigger doesn't really provide 'C' character support (should it really even be in the docs?), I have commented it out in the javadocs for CronExpression. See the various public methods for more information on this. I've tried to javadoc everything fairly well.
The second class was the real impetus behind this code, and it defines a new org.quartz.Calendar, called CronCalendar. This allows users to build a calendar using cron expressions to define the excluded times for any trigger. This could be very powerful when used in conjunction with a CronTrigger, although I think the most common use would be with SimpleTriggers. In any case, I thought it was a cool idea, so I thought I'd see if I could make it work.
Note, I did not remove CronTrigger's cron-related code, because I don't know how that would affect the persistence designs. But the changes shouldn't be too hard for the trigger itself. |
Show » |
|