[Index]

schedules:time


Provide a schedule for an interval of time. When used as a refinement this schedule will narrow the parent interval down to an interval of time on the first day of the parent interval, or if the toLast property is specified, from the first day to the last day of the parent interval. When used as the topmost definition for a schedule then this schedule specifies a single interval of time starting on the current day.

To provide a schedule for each day at a certain time see the schedules:daily schedules.


Property Summary

at The time at which this schedule is for.
from The from time.
refinement Provide a refinement to this schedule.
to The to time.
toLast The to time for the end of the parent interval.

Example Summary

Example 1 A simple time example.
Example 2 Using an interval with time to schedule something every 15 minutes between 10pm and 4am the next day.
Example 3 Schedule something over a whole week between two times.

Property Detail

at

Configured ByATTRIBUTE
AccessWRITE_ONLY
RequiredNo.

The time at which this schedule is for. This has the same effect as setting from and to to the same thing.

from

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo. Defaults to the start of any parent interval or the beginning of time.

The from time.

refinement

Configured ByELEMENT
AccessREAD_WRITE
RequiredNo.

Provide a refinement to this schedule.

to

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo. Defaults to the end of the last day of the parent interval, or the end of time.

The to time. If specified, this is the time on the first day of the parent interval.

toLast

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo. The to property, or it's default value, will be used instead.

The to time for the end of the parent interval. This differs from the to property in that the to property is for the first day of the parent interval.


Examples

Example 1

A simple time example.

<schedules:time at="10:00" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules"/>
When used with a scheduling:timer this would run a job just once at 10am, and never again. If the timer was started after 10am, then the job would run the following day at 10am. If it was required that the job would run any time the timer was started after 10am then the from property should be used instead of the at property.

Example 2

Using an interval with time to schedule something every 15 minutes between 10pm and 4am the next day. The end time is 03:50 yet the last interval is 03:45 to 04:00 because the interval starts before the end time.

<schedules:time from="22:00" to="03:50" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules">
    <refinement>
        <schedules:interval interval="00:15"/>
    </refinement>
</schedules:time>

Example 3

Schedule something over a whole week between two times. This demonstrates how the toLast property works.

<schedules:weekly from="Monday" to="Friday" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules">
    <refinement>
        <schedules:time from="08:00" toLast="18:00">
            <refinement>
                <schedules:interval interval="02:00"/>
            </refinement>
        </schedules:time>
    </refinement>
</schedules:weekly>
The schedule would be due every two hours all day and all night from 8am Monday morning until 6pm Friday afternoon.


(c) R Gordon Ltd 2005 - Present