# Best way to have a timer counter tag

**URL:** <https://forum.inductiveautomation.com/t/best-way-to-have-a-timer-counter-tag/114864>\
**Category:** Ignition\
**Tags:** scripting, ignition81\
**Created:** [April 2, 2026, 3:14pm UTC](https://forum.inductiveautomation.com/t/best-way-to-have-a-timer-counter-tag/114864 "2026-04-02T15:14:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![svatsal77](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@svatsal77](https://forum.inductiveautomation.com/u/svatsal77)\
**Post date:** [April 2, 2026, 3:14pm UTC](https://forum.inductiveautomation.com/t/best-way-to-have-a-timer-counter-tag/114864/1 "2026-04-02T15:14:47Z")

</div>

What is the best way to have a timer tag.  
Currently I'm having like an expression tag with exp : 'getSecond(now())'  
There's a tag change script on the expression tag which first reads the existing value of a memory tag and then increments it by one.  
But there are times where missed events are encountered, so which doesnot increments the counter tag every one sec.  
Any alternate way to have a counter tag ?

---

<div class="post-metadata">

**Author:** ![Ryan\_Deardorff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan_deardorff/32/63815_2.png) [@Ryan\_Deardorff](https://forum.inductiveautomation.com/u/Ryan_Deardorff)\
**Post date:** [April 2, 2026, 3:17pm UTC](https://forum.inductiveautomation.com/t/best-way-to-have-a-timer-counter-tag/114864/2 "2026-04-02T15:17:47Z")

</div>

Instead of a memory tag, you might consider using **`secondsBetween(date1, now())`** with a date1 value set to indicate a count of 0.

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [April 2, 2026, 3:20pm UTC](https://forum.inductiveautomation.com/t/best-way-to-have-a-timer-counter-tag/114864/3 "2026-04-02T15:20:54Z")

</div>

Building on this, use a tag to store the future datetime if using a timer with a preset span OR the start datetime if using an accumulating timer with no set end. Then use ryan\_deardoff's method, using your timestamp tag for one of the date values.

---

<div class="post-metadata">

**Author:** ![Tim\_Bookout1](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@Tim\_Bookout1](https://forum.inductiveautomation.com/u/Tim_Bookout1)\
**Post date:** [April 2, 2026, 3:28pm UTC](https://forum.inductiveautomation.com/t/best-way-to-have-a-timer-counter-tag/114864/4 "2026-04-02T15:28:23Z")

</div>

Is the NOW() function impacted by DST? If so, is there a better function to use?

---

<div class="post-metadata">

**Author:** ![svatsal77](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@svatsal77](https://forum.inductiveautomation.com/u/svatsal77)\
**Post date:** [April 2, 2026, 5:05pm UTC](https://forum.inductiveautomation.com/t/best-way-to-have-a-timer-counter-tag/114864/5 "2026-04-02T17:05:21Z")

</div>

The tag change script is getting triggered every second, and the execution of script written on it is getting completed in ms, so how can there be any missed event? still wondering on this?

---

<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:** [April 2, 2026, 7:09pm UTC](https://forum.inductiveautomation.com/t/best-way-to-have-a-timer-counter-tag/114864/6 "2026-04-02T19:09:26Z")

</div>

> [@svatsal77](#):
>
> there be any missed event?

Some **other** tag valueChange events are breaking the rules and tying up the thread pool.

---

<div class="post-metadata">

**Author:** ![Tim\_Bookout1](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@Tim\_Bookout1](https://forum.inductiveautomation.com/u/Tim_Bookout1)\
**Post date:** [April 2, 2026, 8:40pm UTC](https://forum.inductiveautomation.com/t/best-way-to-have-a-timer-counter-tag/114864/7 "2026-04-02T20:40:15Z")

</div>

Thanks!  
Opened a ticket with support to better troubleshoot this.  
But if there is a good post/resource that delves into subject matter, appreciate a link.

---

<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:** [April 3, 2026, 7:06am UTC](https://forum.inductiveautomation.com/t/best-way-to-have-a-timer-counter-tag/114864/8 "2026-04-03T07:06:28Z")

</div>

[https://forum.inductiveautomation.com/search?q=tag%20valueChange%20thread%20pool%20order%3Alatest](https://forum.inductiveautomation.com/search?q=tag%20valueChange%20thread%20pool%20order%3Alatest)
