Skip to main content

1E SDK

Agent.Stagger

Method

Stagger

Module

Agent

Library

Core

Action

Delay for a random amount of time up to a limit.

Parameters

Limit (int): The maximum number of seconds for which to to delay.

If the value is less than 1 then the value of DefaultStaggerRangeSecs in the agent configuration file is used.

Return values

StaggerTime (int): The actual delay in milliseconds.

Example

 Agent.Stagger(Limit:30);

Platforms

  • Windows

  • Linux

  • MacOS

Notes

Useful for ensuring that multiple agents do not all execute following instructions at the same time, to prevent overloading a shared resource.

If the value is less than 1 thenDefaultStaggerRangeSecsis used. This includes 0, therefore the mimimum delay is 1 second unless DefaultStaggerRangeSecs=0.