|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.oddjob.schedules.AbstractSchedule
org.oddjob.schedules.ConstrainedSchedule
org.oddjob.schedules.schedules.DailySchedule
public final class DailySchedule
If the 'to' time is less than the 'from' time it is assumed that the 'to' time is the next day.
Timer
this would run a job
every day at 10am.
<schedules:daily at="10:00" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules"/>
<schedules:daily from="22:00" to="03:50" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules"> <refinement> <schedules:interval interval="00:15"/> </refinement> </schedules:daily>
Constructor Summary | |
---|---|
DailySchedule()
|
Method Summary | |
---|---|
protected Calendar |
fromCalendar(Date referenceDate,
TimeZone timeZone)
Provide a Calendar for the start of the constraint. |
String |
getFrom()
|
String |
getTo()
|
protected CalendarUnit |
intervalBetween()
Sub classes must provide a unit which is what must be added to move the schedule on. |
void |
setAt(String at)
|
void |
setFrom(String from)
|
void |
setTo(String to)
|
protected Calendar |
toCalendar(Date referenceDate,
TimeZone timeZone)
Provide a Calendar for the end of the constraint. |
String |
toString()
Override toString. |
Methods inherited from class org.oddjob.schedules.ConstrainedSchedule |
---|
lastInterval, nextDue, nextInterval, shiftFromCalendar, shiftToCalendar |
Methods inherited from class org.oddjob.schedules.AbstractSchedule |
---|
getRefinement, setRefinement |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DailySchedule()
Method Detail |
---|
public void setFrom(String from)
Property: from
Description: The from time.
Required: No. Default to the start of the day.
from
- The from date.public String getFrom()
public void setTo(String to)
Property: to
Description: The to time.
Required: No. Default to the end of the day.
to
- The to date.public String getTo()
public void setAt(String at)
Property: at
Description: The time at which this schedule is for. This has the same effect as setting from and to to the same thing.
Required: No.
at
- The at time.protected CalendarUnit intervalBetween()
ConstrainedSchedule
intervalBetween
in class ConstrainedSchedule
protected Calendar fromCalendar(Date referenceDate, TimeZone timeZone)
ConstrainedSchedule
fromCalendar
in class ConstrainedSchedule
referenceDate
- The date/time now.timeZone
- The time zone.
protected Calendar toCalendar(Date referenceDate, TimeZone timeZone)
ConstrainedSchedule
toCalendar
in class ConstrainedSchedule
referenceDate
- The date/time now.timeZone
- The time zone.
public String toString()
toString
in class ConstrainedSchedule
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |