[Index]

schedules:broken


This schedule allows a normal schedule to be broken by the results of another schedule. This might be a list of bank holidays, or time of day, or any other schedule.

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.


Property Summary

alternative An alternative schedule to apply during a break.
breaks The breaks.
schedule The schedule.

Example Summary

Example 1 A schedule that breaks for Christmas.
Example 2 A schedule with an alternative.
Example 3 Examples elsewhere.

Property Detail

alternative

Configured ByELEMENT
AccessREAD_WRITE
RequiredNo.

An alternative schedule to apply during a break. The alternative schedule will be passed the interval that is the break.

breaks

Configured ByELEMENT
AccessREAD_WRITE
RequiredNo, but this schedule is pointless if none are provided.

The breaks.

schedule

Configured ByELEMENT
AccessREAD_WRITE
RequiredYes.

The schedule.


Examples

Example 1

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.

Example 2

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>

Example 3

Examples elsewhere.


(c) Rob Gordon 2005 - 2014