org.oddjob.schedules.schedules
Class DayAfterSchedule

java.lang.Object
  extended byorg.oddjob.schedules.AbstractSchedule
      extended byorg.oddjob.schedules.schedules.DayAfterSchedule
All Implemented Interfaces:
RefineableSchedule, Schedule, java.io.Serializable

public final class DayAfterSchedule
extends AbstractSchedule
implements java.io.Serializable

Description:
A schedule that returns the day after when a nested schedule is due.

This is designed to be used for processing which happens the day after, i.e. processing previous business days data.

This is paticularly useful for scheduling around holidays when a process is still required to run on the holiday, but not the day after the holiday.

Example:
This will run at 2am tuesday to saturday.
 <dayafter>
   <dayofmonth from="25" to="0" >
     <last>
        <dayofweek from="mon" to="fri" >
          <time on="02:00" /gt;
        </dayofweek>
     </last>h;
   </dayofmonth>
 </dayafter>
 
See Also:
Serialized Form
Author:
Rob Gordon

Constructor Summary
DayAfterSchedule()
           
 
Method Summary
 Interval 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.
 
Methods inherited from class org.oddjob.schedules.AbstractSchedule
addValueSchedule, getChildSchedule, getLimits, setChildSchedule, setLimits
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DayAfterSchedule

public DayAfterSchedule()
Method Detail

nextDue

public Interval nextDue(ScheduleContext context)
Description copied from interface: Schedule
For a given date a schedule will provide the interval this schedule should next be scheduled in.

If the schedule is never due again for the given date, null is returned.

Specified by:
nextDue in interface Schedule
Returns:
The next due interval for the schedule.

toString

public java.lang.String toString()
Override toString.