Skip to main content

1E 8.1 (on-premises)

Agent.Sleep

Module

Agent

Method

Sleep

Library

Core

Action

Pause for the specified number of seconds.

Parameters

Seconds (int): The number of seconds for which to to pause; must be >0.

Force (boolean; optional, default false): Usually, if the 1E Client is shutting down then a sleep in progress will be aborted. However, forcing the sleep causes it to block shutdown. This is only useful to test something that happens during shutdown, it is not recommended to delay shutdown in most situations.

Exclusive (boolean; optional, default false): Usually the sleep will affect only the instruction's worker thread, and other instructions running in parallel on other threads are not blocked. If this flag is set then this worker will wait for any already-set exclusivity to finish, then set the exclusivity block while it runs so that other exclusivity users will be blocked until the sleep has completed.

Return values

SleepTime (int): The same as Seconds.

Example

 Agent.Sleep(Seconds:120, Force:true, Exclusive:true);

Platforms

  • Windows

  • Linux

  • MacOS

Notes

Only useful for testing.