Making business rule to sleep for 5min

neelalohitkumar
Tera Contributor

I want the business rule to sleep for 5min, while am giving gs.sleep(300000); It's going sleep but not coming out from that. 

 

When I give gs.sleep(250000); It's working properly. 

can help me with this issue.   Thanks in advances.  

1 ACCEPTED SOLUTION

Uncle Rob
Kilo Patron

You could also do the eventQueueScheduled, inserting an event for processing 5 minutes in the future, and then have a Script Action run on the triggering of that event.  Much cleaner and easier to troubleshoot when things go wrong.

View solution in original post

2 REPLIES 2

Ct111
Tera Sage

try using the 

 

setTimeOut  or  setInterval    methods

 

 

and let me know the result if it helps

 

refer below link link if needed for usage

https://www.w3schools.com/js/js_timing.asp

https://www.w3schools.com/jsref/met_win_setinterval.asp

 

Mark my ANSWER as CORRECT and HELPFUL if it helped

Uncle Rob
Kilo Patron

You could also do the eventQueueScheduled, inserting an event for processing 5 minutes in the future, and then have a Script Action run on the triggering of that event.  Much cleaner and easier to troubleshoot when things go wrong.