Timer external api request
![nelson artunduaga](https://us.v-cdn.net/6037124/user_avatars/5917594.jpg)
Hello everyone.
I have a situation where I have to send a request to an API, this API returns me a key and with this key I have to make another request to another endpoint, but, with an interval of approx 7 seconds.
How can I configure that after the first request wait X sec and then make the second request?
Comments
-
Hi @nelson artunduaga - you can use the function "Sleep" to have a 7-second pause (Utility functions > Sleep) in between the logic that you want to execute in the function stack.
-
ohhhh! @Michael Udinski I didn't know it existed, never used it. Thanks!!
-
@Michael Udinski Hey michael, Is there a time limit for this function? If I put for example 8 hours (in seconds), would there be no problem?
-
there is no limit, but your API will timeout long before that. I'd recommend moving the logic to a background task if it needs to execute that far into the future
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback