# Client Timer Script vs Timer component - Ignition Edge

**URL:** <https://forum.inductiveautomation.com/t/client-timer-script-vs-timer-component-ignition-edge/21776>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [January 9, 2019, 8:59pm UTC](https://forum.inductiveautomation.com/t/client-timer-script-vs-timer-component-ignition-edge/21776 "2019-01-09T20:59:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bankeny2](https://avatars.discourse-cdn.com/v4/letter/b/ccd318/32.png) [@bankeny2](https://forum.inductiveautomation.com/u/bankeny2)\
**Post date:** [January 9, 2019, 8:59pm UTC](https://forum.inductiveautomation.com/t/client-timer-script-vs-timer-component-ignition-edge/21776/1 "2019-01-09T20:59:36Z")

</div>

I have a repetitive task that needs to execute every second to repopulate some tables on a screen. In order to prevent bogging down the UI, I would normally execute this on the gateway and write the values to a dataset tag which I would then copy to the tables. However, since Edge does not allow gateway scripts I am considering using either a timer component or a client timer script.

Does the timer component run on its own thread?

Which would be a better choice for this application (Timer component or client timer script)?

---

<div class="post-metadata">

**Author:** ![brandon1](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@brandon1](https://forum.inductiveautomation.com/u/brandon1)\
**Post date:** [January 9, 2019, 9:31pm UTC](https://forum.inductiveautomation.com/t/client-timer-script-vs-timer-component-ignition-edge/21776/2 "2019-01-09T21:31:56Z")

</div>

Just curious, but why do you need to run this scrip every second. Can you not run it when a certain event occurs?

---

<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:** [January 9, 2019, 9:54pm UTC](https://forum.inductiveautomation.com/t/client-timer-script-vs-timer-component-ignition-edge/21776/3 "2019-01-09T21:54:01Z")

</div>

Neither runs on its own thread, I believe. I would use a timer event script, which would invokeAsynchronous, which would then write the results to a client tag.

---

<div class="post-metadata">

**Author:** ![bankeny2](https://avatars.discourse-cdn.com/v4/letter/b/ccd318/32.png) [@bankeny2](https://forum.inductiveautomation.com/u/bankeny2)\
**Post date:** [January 9, 2019, 10:04pm UTC](https://forum.inductiveautomation.com/t/client-timer-script-vs-timer-component-ignition-edge/21776/4 "2019-01-09T22:04:20Z")

</div>

Hard to explain in a short response … but it is because that the table cells are not always populated from the same location/tag (they can also grow/shrink). They are populated from a dataset which is made from scanning the tags that are present in a particular udt.

---

<div class="post-metadata">

**Author:** ![bankeny2](https://avatars.discourse-cdn.com/v4/letter/b/ccd318/32.png) [@bankeny2](https://forum.inductiveautomation.com/u/bankeny2)\
**Post date:** [January 9, 2019, 10:05pm UTC](https://forum.inductiveautomation.com/t/client-timer-script-vs-timer-component-ignition-edge/21776/5 "2019-01-09T22:05:13Z")

</div>

Great. I go with that. Thank you!
