# Tag Reset on SpecificHour

**URL:** <https://forum.inductiveautomation.com/t/tag-reset-on-specifichour/34599>\
**Category:** General Discussion\
**Created:** [May 9, 2020, 12:32pm UTC](https://forum.inductiveautomation.com/t/tag-reset-on-specifichour/34599 "2020-05-09T12:32:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vasilevdim](https://avatars.discourse-cdn.com/v4/letter/v/7ba0ec/32.png) [@vasilevdim](https://forum.inductiveautomation.com/u/vasilevdim)\
**Post date:** [May 9, 2020, 12:32pm UTC](https://forum.inductiveautomation.com/t/tag-reset-on-specifichour/34599/1 "2020-05-09T12:32:06Z")

</div>

Hi,  
Please advise script that resets tag on specific hour, let’s say 5:15 AM.  
Thank you!

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [May 9, 2020, 1:42pm UTC](https://forum.inductiveautomation.com/t/tag-reset-on-specifichour/34599/2 "2020-05-09T13:42:46Z")

</div>

```auto
from time import localtime, strftime
curDay = strftime("%d", localtime())
curTime = strftime("%H:%M:%S", localtime())

if curTime == "05:15:00":
	#do Something

elif curTime == "09:23:00":	
	Do something else

```

Create a gateway timer script, executing every 750ms, with **dedicated** threading

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [May 9, 2020, 2:06pm UTC](https://forum.inductiveautomation.com/t/tag-reset-on-specifichour/34599/3 "2020-05-09T14:06:10Z")

</div>

You can also upvote this ideas post, as it would make it much easier in the future 🙂

> **[Gateway script type triggered at specific time. | Voters | Inductive Automation](https://inductiveautomation.canny.io/ignition-features-and-ideas/p/gateway-script-type-triggered-at-specific-time)**

---

<div class="post-metadata">

**Author:** ![vasilevdim](https://avatars.discourse-cdn.com/v4/letter/v/7ba0ec/32.png) [@vasilevdim](https://forum.inductiveautomation.com/u/vasilevdim)\
**Post date:** [May 9, 2020, 6:58pm UTC](https://forum.inductiveautomation.com/t/tag-reset-on-specifichour/34599/4 "2020-05-09T18:58:31Z")

</div>

Thanks a lot. Tested, it works.
