Exploring TM1 - a Chartertech Company
Search
Close this search box.

Sleep in TM1: How to Pause a TI Process

Have you ever need to make a Turbo Integrator process sleep for a short while so another system can catch up? Getting a TI to pause can be a really useful step to include where you’re waiting on an external process to complete (like a file to be written by the operating system). It can also be really useful for having a TI pause where you want it to wait and then have it go back an repeatedly check for a condition to be true.

Sleep Function Syntax

The syntax of the sleep is very simple. It is just:

sleep ( n ); 

where n is the number of milli seconds you want it to wait.

Example

An example of the sleep function is:

# Pause TI for 5 Seconds
nSleep = 5000;
sleep ( nSleep );

This will cause the process to wait for 5 seconds until it continues.

Why Wait?

The sleep function can be used in the following ways:

  • Where you are waiting for an external process to finish.
  • You need to loop back and check for a condition to be true. Yes, I know you could have a repeatedly scheduled chore to do it too.
  • There’s a master TI that is using ExecuteProcess to call a range of child processes and need to insert a wait step between some of the child steps.

  • This field is for validation purposes and should be left unchanged.

Post Sections

Related Posts

John Vaughan

John Vaughan

John is a CPA, MBA and has been a Performance Management consultant for over 25 years. He is the founder of ExploringTM1 and highly regarded for his experience combining financial management with corporate planning, reporting and analysis. He lives in Sydney with his wife, two of his three children, their cat, Freckles, a bunch of chooks and some fish. John is a sports nut, who played rugby until he was 40, started playing football at 54 and loves being outdoors.

Leave a Reply

Your email address will not be published. Required fields are marked *

Log In