Description
Schedule something after the given schedule.
This can be useful when wanting a schedule to begin at the end of an
interval instead of the beginning, or for scheduling around holidays when
a process is still required to run on the holiday, but not the day after
the holiday.
The after schedule differs from the DayAfterSchedule
in that
day-after is designed to narrow it's parent interval but this schedule
applies a refinement to it child schedule. The difference is subtle
but hopefully the examples demonstrate how each should be used.
Example
A schedule for the end of the interval.
<schedules:count count="1" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules">
<refinement>
<schedules:after>
<schedule>
<schedules:interval interval="00:20"/>
</schedule>
</schedules:after>
</refinement>
</schedules:count>
This would schedule a job to run once after 20 minutes. It could be
used to stop a long running job for instance.Example
A schedule for the day after a the current business day.
<schedules:after xmlns:schedules="http://rgordon.co.uk/oddjob/schedules">
<schedule>
<schedules:broken>
<schedule>
<schedules:weekly from="MONDAY" to="FRIDAY">
<refinement>
<schedules:daily/>
</refinement>
</schedules:weekly>
</schedule>
<breaks>
<schedules:date on="2011-05-02"/>
</breaks>
</schedules:broken>
</schedule>
<refinement>
<schedules:time from="08:00"/>
</refinement>
</schedules:after>
Normally this will schedule something from 08:00 am Tuesday to Saturday,
but for the week where Monday 2nd of May was a public holiday the schedule
will be from Wednesday to Saturday.- See Also:
- Serialized Form
- Author:
- Rob Gordon