We have client action in which we have a flow which needs to be executed after a certain period of time. Is there any wait/sleep/delay action or function ?


We know this can be achieved by JavaScript/jQuery. However in this scenario we are adding rows into table using jQuery which loads during preparation. So we do not want to use jQuery/JavaScript


shanthi kallareddy wrote:

We have client action in which we have a flow which needs to be executed after a certain period of time. Is there any wait/sleep/delay action or function ?


We know this can be achieved by jQuery. However in this scenario we are adding rows into table using jQuery which loads during preparation. 


Add a JS delay in Action & try


var delayInMilliseconds = 1000; //1 second

setTimeout(function() {
  //your code to be executed after 1 second
}, delayInMilliseconds);

assif_tiger wrote:

shanthi kallareddy wrote:

We have client action in which we have a flow which needs to be executed after a certain period of time. Is there any wait/sleep/delay action or function ?


We know this can be achieved by jQuery. However in this scenario we are adding rows into table using jQuery which loads during preparation. 


Add a JS delay in Action & try


var delayInMilliseconds = 1000; //1 second

setTimeout(function() {
  //your code to be executed after 1 second
}, delayInMilliseconds);

Thanks for the reply. However we cannot use jQuery in our current scenario. Is there any alternate way?

Hi shanthi kallareddy,

Can you explain what you are doing and why you cannot use JavaScript (or jQuery) to trigger its execution after a certain amount of time? It's the most obvious way of doing lazy-loading for instance.

The typical way of scheduling execution of server-side logic is to use a Timer (in the Processes tab). If you just want to wait (actively) for a certain amount of time, you can use the Sleep forge component.

Hope this helps!