public class IntervalSchedule extends java.lang.Object implements Schedule, java.io.Serializable
This schedule is commonly used as a refinement of another schedule
such as the DailySchedule
, TimeSchedule
or CountSchedule
schedules.
<schedules:interval interval="00:20" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules"/>
Constructor and Description |
---|
IntervalSchedule()
Default bean constructor.
|
IntervalSchedule(long millis)
Constructor with milliseconds.
|
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.
|
void |
setInterval(java.lang.String interval) |
java.lang.String |
toString() |
public IntervalSchedule()
public IntervalSchedule(long millis)
millis
- public void setInterval(java.lang.String interval) throws java.text.ParseException
Property: interval
Description: The interval time. The interval must be specified in one of the formats:
Required: No but defaults to no interval.
interval
- The interval.java.text.ParseException
- If the interval is not a valid date.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