[Index]

schedules:count


This schedule returns up to count number of child schedules. It is typically used to count a number intervals for re-trying something.

If there is more than one count in a schedule a key must be provided to differentiate their internally store numbers, otherwise the count value would be shared.

If the nested schedule isn't specified it defaults to schedules:now


Property Summary

count The number to count to.
identifier If there are more than one count schedules in a schedule then this key is required to differentiate them.
refinement Provide a refinement to this schedule.

Example Summary

Example 1 A schedule for 5 times at intervals of 15 minutes.
Example 2 A schedule for 3 times each day at 5 minute intervals.
Example 3 Nested count schedules.

Property Detail

count

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredYes.

The number to count to.

identifier

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

If there are more than one count schedules in a schedule then this key is required to differentiate them. It can be any text.

refinement

Configured ByELEMENT
AccessREAD_WRITE
RequiredNo.

Provide a refinement to this schedule.


Examples

Example 1

A schedule for 5 times at intervals of 15 minutes.

<schedules:count count="5" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules">
    <refinement>
        <schedules:interval interval="00:15"/>
    </refinement>
</schedules:count>

Example 2

A schedule for 3 times each day at 5 minute intervals.

<schedules:daily xmlns:schedules="http://rgordon.co.uk/oddjob/schedules">
    <refinement>
        <schedules:time from="11:00">
            <refinement>
                <schedules:count count="3">
                    <refinement>
                        <schedules:interval interval="00:05"/>
                    </refinement>
                </schedules:count>
            </refinement>
        </schedules:time>
    </refinement>
</schedules:daily>

Example 3

Nested count schedules. This slightly contrived example would cause a timer to run a job twice at 1 minute intervals for 3 days. Note that we need a key on one of the schedules to differentiate them.

<schedules:count identifier="outer" count="6" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules">
    <refinement>
        <schedules:daily from="11:00">
            <refinement>
                <schedules:count count="2">
                    <refinement>
                        <schedules:interval interval="00:01"/>
                    </refinement>
                </schedules:count>
            </refinement>
        </schedules:daily>
    </refinement>
</schedules:count>


(c) R Gordon Ltd 2005 - Present