NthIncludedDayTrigger
will skip excluded days on the associated calendar. This would commonly be used in an Nth business day situation, in which the user wishes to fire a particular job on the Nth business day (i.e. the 5th business day of every month). Each NthIncludedDayTrigger
also has an associated fireAtTime
which indicates at what time of day the trigger is to fire. All NthIncludedDayTrigger
s default to a monthly interval type (fires on the Nth day of every month) with N = 1 (first non-excluded day) and fireAtTime
set to 12:00 PM (noon). These values can be changed using the {@link #setN}, {@link #setIntervalType}, and {@link #setFireAtTime} methods. Users may also want to note the {@link #setNextFireCutoffInterval} and {@link #getNextFireCutoffInterval}methods.
Take, for example, the following calendar:
July August September Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa 1 W 1 2 3 4 5 W 1 2 W W H 5 6 7 8 W W 8 9 10 11 12 W W H 6 7 8 9 W W 11 12 13 14 15 W W 15 16 17 18 19 W W 12 13 14 15 16 W W 18 19 20 21 22 W W 22 23 24 25 26 W W 19 20 21 22 23 W W 25 26 27 28 29 W W 29 30 31 W 26 27 28 29 30 W
Where W's represent weekend days, and H's represent holidays, all of which are excluded on a calendar associated with an NthIncludedDayTrigger
with n=5
and intervalType=INTERVAL_TYPE_MONTHLY
. In this case, the trigger would fire on the 8th of July (because of the July 4 holiday), the 5th of August, and the 8th of September (because of Labor Day).
@author Aaron Craven
|
|