# Timer Control

**URL:** <https://forum.inductiveautomation.com/t/timer-control/1890>\
**Category:** Ignition\
**Created:** [June 3, 2010, 3:35pm UTC](https://forum.inductiveautomation.com/t/timer-control/1890 "2010-06-03T15:35:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhastie](https://avatars.discourse-cdn.com/v4/letter/b/d6d6ee/32.png) [@bhastie](https://forum.inductiveautomation.com/u/bhastie)\
**Post date:** [June 3, 2010, 3:35pm UTC](https://forum.inductiveautomation.com/t/timer-control/1890/1 "2010-06-03T15:35:17Z")

</div>

I want to have a timer run on an event and then stop when it gets to the upper bound of its count. Functionally, I think I know how to do it, but am having trouble with the syntax. Essentially, I have a component which is counting boxes on a conveyor. When a new box is counted, I want to fire the timer and let it count up to its upper bound and stop. I am using the timer to animate the box traveling down the conveyor. Right now, the timer just loops around and runs continuously irregardless of whether or not there is a box on the conveyor.

---

<div class="post-metadata">

**Author:** ![Robert.McKenzie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert.mckenzie/32/4134_2.png) [@Robert.McKenzie](https://forum.inductiveautomation.com/u/Robert.McKenzie)\
**Post date:** [June 3, 2010, 4:15pm UTC](https://forum.inductiveautomation.com/t/timer-control/1890/2 "2010-06-03T16:15:25Z")

</div>

To get the timer to stop after one cycle, you can put this code on the propertyChange event of the timer component.

`if event.propertyName == "value" and event.newValue == 0:
	event.source.running = 0`
