The CreatorCon Call for Content is officially open! Get started here.

Call the rest message after 5 minutes

tanz
Tera Expert

Hi,

 

I have a script which call the rest message and triggers the payload for incident number and short description. I have a requirement to call the rest message at an interval of 5 minutes for three time in case i do not get a response  as 200 success first time or second time (failure of API). If i get response in 1st time or in 2nd time then stop the process.

 

This should trigger a eventqueue which triggers a notification that API failed - ex: 500 internal server error.

 

Could you please help to achieve the script.

Thanks

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@tanz 

why not use flow designer approach with retry?

OR

you can use eventQueueScheduled() to keep delay of 5mins

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader