repeat


This job will repeatedly either for a number of times or until the until property is true;

Without either a until or a times the job will loop indefinitely.


Property Summary

count The count of repeats.
job The job who's execution to schedule.
name A name, can be any text.
times The number of times to repeat.
until Repeat will repeat until the value of this property is true.

Example Summary

Example 1 Repeat a job 3 times.

Property Detail

count

AccessREAD_ONLY
RequiredRead Only.

The count of repeats.

job

Configured ByELEMENT
AccessWRITE_ONLY
RequiredYes.

The job who's execution to schedule.

name

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

A name, can be any text.

times

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

The number of times to repeat.

until

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

Repeat will repeat until the value of this property is true.


Examples

Example 1

Repeat a job 3 times.

<oddjob>
    <job>
        <repeat times="3" id="repeat">
            <job>
                <echo>Hello ${repeat.count}</echo>
            </job>
        </repeat>
    </job>
</oddjob>


(c) Rob Gordon 2005 - 2011