# Timer Component - Run Once on Window Open

**URL:** <https://forum.inductiveautomation.com/t/timer-component-run-once-on-window-open/79454>\
**Category:** Ignition\
**Tags:** vision, ignition81\
**Created:** [September 21, 2023, 2:49pm UTC](https://forum.inductiveautomation.com/t/timer-component-run-once-on-window-open/79454 "2023-09-21T14:49:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [September 21, 2023, 2:49pm UTC](https://forum.inductiveautomation.com/t/timer-component-run-once-on-window-open/79454/1 "2023-09-21T14:49:08Z")

</div>

I have a timer component that I would like to run up to a certain number once and then stop.

I can write the Running prop via script on startup, but how do I get the timer to not reset once it hits the bound?

Also - why no customizer for timer?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 21, 2023, 2:54pm UTC](https://forum.inductiveautomation.com/t/timer-component-run-once-on-window-open/79454/2 "2023-09-21T14:54:37Z")

</div>

Have it disable itself within its `actionPerformed` event?

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [September 21, 2023, 2:55pm UTC](https://forum.inductiveautomation.com/t/timer-component-run-once-on-window-open/79454/3 "2023-09-21T14:55:03Z")

</div>

Tried that. Action performed doesn't seem to execute ever

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 21, 2023, 2:59pm UTC](https://forum.inductiveautomation.com/t/timer-component-run-once-on-window-open/79454/4 "2023-09-21T14:59:34Z")

</div>

> [@amarks](#):
>
> doesn't seem to execute

Show your code.

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [September 21, 2023, 3:07pm UTC](https://forum.inductiveautomation.com/t/timer-component-run-once-on-window-open/79454/5 "2023-09-21T15:07:49Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/3/a3a7ea91fd4a13b30897171601010b8c64c7e3f2.png)

\*\*it does execute, but after the first step. Not at the bounds

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [September 21, 2023, 3:12pm UTC](https://forum.inductiveautomation.com/t/timer-component-run-once-on-window-open/79454/6 "2023-09-21T15:12:00Z")

</div>

With that info I was able to make it work.

Final code:

```auto
if event.source.value > event.source.parent.startupTime:
	event.source.running = False

```

I would've use a custom property rather than a root prop, but

> [@amarks](#):
>
> why no customizer for timer?
