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.
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 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. |
Configured By | ATTRIBUTE |
Access | WRITE_ONLY |
Required | No. |
The time at which this schedule is for. This has the same effect as setting from and to to the same thing.
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | No. Defaults to the start of any parent interval or the beginning of time. |
The from time.
Configured By | ELEMENT |
Access | READ_WRITE |
Required | No. |
Provide a refinement to this schedule.
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | No. 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.
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | No. 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.
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.
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>
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.