# Gateway Timer Script settings

**URL:** <https://forum.inductiveautomation.com/t/gateway-timer-script-settings/2800>\
**Category:** Ignition\
**Created:** [March 23, 2011, 7:03pm UTC](https://forum.inductiveautomation.com/t/gateway-timer-script-settings/2800 "2011-03-23T19:03:01Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [March 23, 2011, 7:03pm UTC](https://forum.inductiveautomation.com/t/gateway-timer-script-settings/2800/1 "2011-03-23T19:03:01Z")

</div>

Doesn’t look like I can change the timer value for a script. Or can we?

I’d like to update a pace counter value based on a particular product-- it works okay, but but if the product changes, I’d like to be able to change the delay of the script to match.

Any way to do this, or am I just whistling The Marriage of Figaro? (I don’t whistle Dixie anymore-- too cliche…)

---

<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:** [March 23, 2011, 9:07pm UTC](https://forum.inductiveautomation.com/t/gateway-timer-script-settings/2800/2 "2011-03-23T21:07:51Z")

</div>

You could make the timer run every second and add a DBtag that gets incremented every time the script runs. That way you could check if it is \>= another DBTag that stores the number of seconds between script executions. Something like:[code]#get the tag values  
elapsedTime = system.tag.getTagValue(‘ElapsedTime’)  
numCycles = system.tag.getTagValue(‘NumCycles’)

#write the new increased value to the elapsed time tag  
system.tag.writeToTag(‘ElapsedTime’, elapsedTime+1)

#check if it has been long enough  
if elapsedTime \>= numCycles:  
#run my script[/code]
