B.39 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.39: Attributes

retrycountIntegernumber of times to attempt to execute the nested task 1Yes
retrydelayIntegernumber 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.39.1 Example

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

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