B.38 WaitForTask
Prev | Appendix B. Core tasks | Next

## B.38 WaitForTask

Wait for a condition to become true or a timeout, whichever comes first.

Table B.41: Attributes

Name | Type | Description | Default | Required
--- | --- | --- | --- | ---
`MaxWait` | `Integer` | Set the maximum length of time to wait in units | 3min | Yes
`WaitUnit` | `String` | Set the max wait time unit. Must be one of "`week`","`day`", "`hour`", "`minute`", "`second`", "`millisecond`" | millisecond | No
`CheckEvery` | `Integer` | Set the time between each check | 500ms | Yes
`CheckEveryUnit` | `String` | Set the check every time unit. Must be one of "`week`","`day`", "`hour`", "`minute`", "`second`", "`millisecond`" | milliseconds | No
`TimeoutProperty` | `String` | Name of the property to set after a timeout. | null | No

### B.38.1 Examples

Wait for a maximum of ten seconds for the file "`ready`" to appear.

    <waitfor maxwaitunit="second" maxwait="10">
      <available file="ready"/>
    </waitfor>

### B.38.2 Supported Nested Tags

All conditionals including `and`, `or`, `not` etc.

Prev | Up | Next
B.37 UpToDateTask | Home | B.39 XsltTask