B.53 Retry

Retry is a container which executes a single nested task until either: there is no failure; or: its retrycount has been exceeded. If this happens a BuildException is thrown..

Table B.55: Attributes

NameTypeDescriptionDefaultRequired
retrycount Integer number of times to attempt to execute the nested task 1Yes
retrydelay Integer number of seconds to wait between retry attempts task. 0No, defaults to no delay

Any valid Phing task may be embedded within the retry task.

B.53.1 Example

<retry retrycount="3">
    <httpget url="http://www.unreliable-server.com/unreliable.tar.gz" dir="/home/retry"/>
</retry>
        

This example shows how to use <retry> to wrap a task which must interact with an unreliable network resource.