|
Wait - For duration |
Declaration
<AMWAIT SCALAR="number" MEASURE="minutes" />
Description
Pauses task execution at the current step for a specific amount of time. The duration can be set to hours, minutes, seconds or milliseconds.
Practical Usage
Typically used to wait a certain amount of time for something to occur (which is normally beyond the control of the task) before proceeding, such as when a specific condition starts, stops or changes. For example, wait 10 seconds to ensure a particular web page has completely loaded or wait 5 minutes to make certain a specific process has finished.
Parameters
General
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Wait for | Number | Yes | (Empty) | SCALAR="20" | The duration of time to wait. This value corresponds directly with the Measure parameter (more details below). |
Measure | Text (options) | Yes | Seconds |
|
The
time measurement to use in accordance with the value entered in
the Wait for parameter.
The available options are:
|
Examples
- The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
- Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.
Description
This task displays a message box asking how many seconds the next step should wait before proceeding and executes a 'Wait for duration' step according to the value (in seconds) specified.
<AMVARIABLE NAME="duration" />
<AMSHOWDIALOG ACTIVITY="input" MESSAGE="How many seconds should the next step wait before proceeding?" DEFAULTVALUE="5" RESULTVARIABLE="duration" WINDOWTITLE="Wait Duration" ICON="information" />
<AMWAIT SCALAR="%duration%" />
<AMSHOWDIALOG>Well, what do you know! %duration% seconds has passed. Thanks for participating.</AMSHOWDIALOG>