public class DayBeforeSchedule extends AbstractSchedule implements java.io.Serializable
This is designed to be used with the BrokenSchedule
's alternative
property to move processing to the day before the holiday.
<schedules:broken xmlns:schedules="http://rgordon.co.uk/oddjob/schedules"> <schedule> <schedules:monthly onDay="LAST"> <refinement> <schedules:time at="17:00"/> </refinement> </schedules:monthly> </schedule> <breaks> <schedules:list> <schedules> <schedules:weekly from="SATURDAY" to="SUNDAY"/> <value value="${holidays}"/> </schedules> </schedules:list> </breaks> <alternative> <schedules:day-before> <refinement> <schedules:time at="21:00"/> </refinement> </schedules:day-before> </alternative> </schedules:broken>Note that the refinement schedules for a different time when the day before is used. This reflects the situation where data is often available later before a weekend or holiday.
Constructor and Description |
---|
DayBeforeSchedule() |
Modifier and Type | Method and Description |
---|---|
ScheduleResult |
nextDue(ScheduleContext context)
For a given date a schedule will provide the interval this schedule
should next be scheduled in.
|
java.lang.String |
toString()
Override toString.
|
getRefinement, setRefinement
public ScheduleResult nextDue(ScheduleContext context)
Schedule
If the schedule is never due again for the given date, null is returned.
public java.lang.String toString()
toString
in class java.lang.Object