Skip to content

Delay

Type: delay  ·  Package: Core Activities v1.0.8

Pauses the execution for the given time (in milliseconds) and then continues with the next activity. It is useful to give a system time to react: for a page to finish loading, for an application to open a window, for a file to finish being written.

When the flow reaches the activity, it stops for the given milliseconds and then continues. Remember: 1000 ms = 1 second.

  • The value is rounded to whole milliseconds. 0 does not wait.
  • When it finishes, it writes an informational line to the log with the time waited: in milliseconds (Waited 500 ms.) or, from one second on, in seconds.
  • If someone terminates the execution during the wait, the pause ends right there.
ParameterTypeDefaultDescription
millisecondsint—Wait time in milliseconds (0 or greater). E.g. 1500 = 1.5 seconds.

None.

This activity does not return a value.

Wait half a second between two actions so as not to overload a slow system:

Page Click page = page selector = "#save"
Delay milliseconds = 500
Page Click page = page selector = "#confirm"
You want to wait…milliseconds
Half a second500
1 second1000
5 seconds5000
1 minute60000
MessageCause and fix
Negative valueA value below -1 makes the activity fail, and -1 waits with no limit. If the time comes from a calculation, check with an If first that it is 0 or greater.
The value cannot be converted to a numberThe expression returned a text that is not a number. Convert it with num(...).
  • Retry — retry an unstable action instead of waiting blindly.
  • While — actively wait until a condition is met.