# Value changed script delay

**URL:** <https://forum.inductiveautomation.com/t/value-changed-script-delay/84942>\
**Category:** Ignition\
**Created:** [January 30, 2024, 9:10am UTC](https://forum.inductiveautomation.com/t/value-changed-script-delay/84942 "2024-01-30T09:10:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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 30, 2024, 1:34pm UTC](https://forum.inductiveautomation.com/t/value-changed-script-delay/84942/2 "2024-01-30T13:34:36Z")

</div>

> [@Alpar\_Kovacs](#):
>
> that are inserting the tag value in an SQL

This is a task that takes too long to do directly in a tag event. Use the store and forward engine or use a gateway tag change event (in the project, not on the tag). See this recent topic for **why** this is true:

> [@Tag Change Scripts stop working](https://forum.inductiveautomation.com/t/tag-change-scripts-stop-working/84819):
>
> Every once in a while, we have a situation where basically all of our tag change scripts stop processing. I finally saw this error in the Console of the designer Diagnostics. It's almost as if the Basic Execution Engine has run out of threads. WARN Common.BasicExecutionEngine - Execution rejected... running in calling thread [AWT-EventQueue-0] immediately. [com.inductiveautomation.ignition.designer.tags.tree.TagTreeModelImpl$BatchOp$$Lambda$949/0x0000016597b1a668@d72dc75] Any ideas where I can…

If you have very dynamic requirements, such that the event must **originate** on a tag event, this topic of _ **advanced** _ techniques might help you:

> [@Java concurrent queue for tag change scripts](https://forum.inductiveautomation.com/t/java-concurrent-queue-for-tag-change-scripts/82044):
>
> Continuing the discussion from [[SOLVED] Are tag Value Changed scripts running asynchronously?](https://forum.inductiveautomation.com/t/solved-are-tag-value-changed-scripts-running-asynchronously/68704/5): We've got code in our standard library that I need to log a value change on a tag and then associate various data points with that value change. The value is located in a UDT, and because this is part of our "standard" library we use for our customers, the number of tags is variable and quite possibly numerous so having a gateway tag event script isn't feasible for this solution. I was reading up on …

---

_[View the full topic](https://forum.inductiveautomation.com/t/value-changed-script-delay/84942)._
