# Advice on how to create a timed event

**URL:** https://community.thunkable.com/t/advice-on-how-to-create-a-timed-event/826174
**Category:** Questions about Thunkable X
**Tags:** timer
**Created:** [September 18, 2020, 1:03am UTC](https://community.thunkable.com/t/advice-on-how-to-create-a-timed-event/826174 "2020-09-18T01:03:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [September 18, 2020, 1:03am UTC](https://community.thunkable.com/t/advice-on-how-to-create-a-timed-event/826174/1 "2020-09-18T01:03:34Z")

</div>

I have a location sensor in my app that gets triggered when someone taps the location symbol button on the screen.

I want to update a variable from an API call once and then every 5 minutes after the location button is tapped. I know the basics of how to do this but I want to avoid having the button tap trigger overlapping 5 minute refreshes of the data.

Here’s how I’ve thought about structuring it:

![Screen Shot 2020-09-17 at 6.03.46 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/4/b4eb2aba9c87c12cc9d743d27f54c286a44614c9.png)

But I’m worried that if you tap the button and then tap it again 5+ minutes later, it will start a new forever loop AND keep the first forever loop going thereby having two API calls every 5 minutes, etc.

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [September 18, 2020, 4:49am UTC](https://community.thunkable.com/t/advice-on-how-to-create-a-timed-event/826174/3 "2020-09-18T04:49:49Z")

</div>

Oh, maybe this:

 ![Screen Shot 2020-09-17 at 9.49.17 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/a/da653c2377609d6dc816fc833559eb94ec164453.png)

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 12:23pm UTC](https://community.thunkable.com/t/advice-on-how-to-create-a-timed-event/826174/4 "2024-11-08T12:23:55Z")

</div>


