# Running Timer Script

**URL:** <https://forum.inductiveautomation.com/t/running-timer-script/110268>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [August 29, 2025, 9:26am UTC](https://forum.inductiveautomation.com/t/running-timer-script/110268 "2025-08-29T09:26:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ros\_Alexander1](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@Ros\_Alexander1](https://forum.inductiveautomation.com/u/Ros_Alexander1)\
**Post date:** [August 29, 2025, 9:26am UTC](https://forum.inductiveautomation.com/t/running-timer-script/110268/1 "2025-08-29T09:26:12Z")

</div>

I’d like the operators to be able to manually start/stop downtime eventson a machine. I have a PLC I can connect to, but wanted to see about writing a script to display a timer. The idea is to have a start/stop button, and when they press the button for whatever downtime event, the timer increases.

---

<div class="post-metadata">

**Author:** ![fakcior](https://avatars.discourse-cdn.com/v4/letter/f/ee59a6/32.png) [@fakcior](https://forum.inductiveautomation.com/u/fakcior)\
**Post date:** [August 29, 2025, 12:29pm UTC](https://forum.inductiveautomation.com/t/running-timer-script/110268/2 "2025-08-29T12:29:22Z")

</div>

You can use expression binding on timer display to show difference between current time and timestamp of button press event.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [August 29, 2025, 1:09pm UTC](https://forum.inductiveautomation.com/t/running-timer-script/110268/3 "2025-08-29T13:09:30Z")

</div>

Log the events an a database table, then query the times between the events using lead/lag functions.
