Delay

Verb: delay

Awaits a period of time to continue script execution.

Syntax

delay [--timeout(TimeSpan)]

Inputs

Script Designer Required AcceptedTypes Description
--timeout Timeout Optional Time Span, Number, Text Amount of waiting time.
In case no value is defined for the timeout parameter, the execution uses the context timeout defined by the Set Timeout command. If that command is not used on the script, the default timeout is 5 seconds.

Example

The Get Current Date and Time command gets the current date and time before and after the Delay command. Log Message shows the Date Time values obtained on the IBM RPA Studio console.

defVar --name dateAndTime --type DateTime
getCurrentDateAndTime --localorutc "LocalTime" dateAndTime=value
logMessage --message "Date and time before delay: ${dateAndTime}" --type "Info"
delay --timeout 00:00:10
getCurrentDateAndTime --localorutc "LocalTime" dateAndTime=value
logMessage --message "Date and time after delay: ${dateAndTime}" --type "Info"
// Shows current date and time before and after "Delay" command.