This schedule works by moving the schedule forward if the start time of the next interval falls within the next interval defined by the break. In the example below for a time of Midday on 24th of December the logic is as follows:
The optional alternative property defines a schedule to be used during the breaks, instead of simply moving the interval forward.
alternative | An alternative schedule to apply during a break. |
breaks | The breaks. |
schedule | The schedule. |
Example 1 | A schedule that breaks for Christmas. |
Example 2 | A schedule with an alternative. |
Example 3 | Examples elsewhere. |
Configured By | ELEMENT |
Access | READ_WRITE |
Required | No. |
An alternative schedule to apply during a break. The alternative schedule will be passed the interval that is the break.
Configured By | ELEMENT |
Access | READ_WRITE |
Required | No, but this schedule is pointless if none are provided. |
The breaks.
Configured By | ELEMENT |
Access | READ_WRITE |
Required | Yes. |
The schedule.
A schedule that breaks for Christmas.
<schedules:broken xmlns:schedules="http://rgordon.co.uk/oddjob/schedules"> <schedule> <schedules:daily at="10:00"/> </schedule> <breaks> <schedules:yearly fromDate="12-25" toDate="12-26"/> </breaks> </schedules:broken>The logic is explained above.
A schedule with an alternative. The schedule breaks at weekends and for Christmas. During the break the schedule will be due once at 11am the first day of the break, instead of the usual 10am.
<schedules:broken xmlns:schedules="http://rgordon.co.uk/oddjob/schedules"> <schedule> <schedules:daily from="10:00"/> </schedule> <breaks> <schedules:list> <schedules> <schedules:weekly from="Saturday" to="Sunday"/> <schedules:date on="2011-12-26"/> <schedules:date on="2011-12-27"/> </schedules> </schedules:list> </breaks> <alternative> <schedules:time from="11:00"/> </alternative> </schedules:broken>
Examples elsewhere.
broken
schedule to calculate the day after the next
working day.broken
schedule being used to calculate the next working day.broken
schedule being used to move the last day of the month.