# Simulating a sleep in ArcScript

**URL:** <https://community.cdata.com/t/simulating-a-sleep-in-arcscript/597>\
**Category:** CData Arc\
**Tags:** discussion\
**Created:** [January 11, 2024, 4:13pm UTC](https://community.cdata.com/t/simulating-a-sleep-in-arcscript/597 "2024-01-11T16:13:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_B](https://sea3.discourse-cdn.com/cdata/user_avatar/community.cdata.com/james_b/32/1688_2.png) [@James\_B](https://community.cdata.com/u/James_B)\
**Post date:** [January 11, 2024, 4:13pm UTC](https://community.cdata.com/t/simulating-a-sleep-in-arcscript/597/1 "2024-01-11T16:13:07Z")

</div>

As of the publishing of this entry, there is nothing inherent in ArcScript that performs the equivalent of a sleep or delay - all commands in ArcScript are executed immediately.

In most cases, it is desirable to execute scripting operations immediately, but there may be times when a sleep between calls would be useful (for example, when interspersing calls to an API that may be rate limited). In that situation, you can effectively create a delay in ArcScript through use of the [sysExecute](https://cdn.cdata.com/help/AZJ/mft/op_SysExecute.html)&nbsp;operation, which allows for the execution of external processes on the machine.

On a Windows environment, for example, you can call out to a batch file which itself implements the delay:

```xml
<arc:set attr="sys.Name" value="C:\\ProgramData\\CData\\Arc\\Sleep_2s.bat" /><arc:call op="sysExecute" item="sys" />

```

In the batch file itself, you can implement your own code for a delay, such as:

```ini
timeout 2

```
