# Blocking execution of system.tag.requestGroupExecution()

**URL:** <https://forum.inductiveautomation.com/t/blocking-execution-of-system-tag-requestgroupexecution/99807>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [December 13, 2024, 4:40pm UTC](https://forum.inductiveautomation.com/t/blocking-execution-of-system-tag-requestgroupexecution/99807 "2024-12-13T16:40:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jules\_Lalu](https://avatars.discourse-cdn.com/v4/letter/j/47e85d/32.png) [@Jules\_Lalu](https://forum.inductiveautomation.com/u/Jules_Lalu)\
**Post date:** [December 13, 2024, 4:40pm UTC](https://forum.inductiveautomation.com/t/blocking-execution-of-system-tag-requestgroupexecution/99807/1 "2024-12-13T16:40:44Z")

</div>

I have a Gateway Script that reads values from multiple tags, including Query tags, to compute an output every 4 seconds.

The query tags fetch values from a table with columns (timestamp, value), and keep only the value with the nearest timestamp from the current time.  
I would like the query tags to be updated at the start of my gateway script so that I always fetch the accurate value, so I have added a group tag that they belong to and trigger their execution with system.tag.requestGroupExecution() at the start of the gateway script.

However, I see that system.tag.requestGroupExecution() only sends a request to the group tag to execute, and does not wait for actual refresh before carrying on with the rest of the script. My script ends up using not up-to-date values.

The answer may be that this is bad design and that we should query from db directly in the script instead of relying on query tags, but I would like to know if it is possible to achieve what I have described above in any case.

Thanks in advance for your help !

---

<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:** [December 13, 2024, 4:53pm UTC](https://forum.inductiveautomation.com/t/blocking-execution-of-system-tag-requestgroupexecution/99807/2 "2024-12-13T16:53:06Z")

</div>

> [@Jules\_Lalu](#):
>
> this is bad design and that we should query from db directly in the script

Yes.

> [@Jules\_Lalu](#):
>
> possible to achieve what I have described

No.
