# Script execution delay

**URL:** <https://forum.inductiveautomation.com/t/script-execution-delay/88409>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [April 5, 2024, 10:14am UTC](https://forum.inductiveautomation.com/t/script-execution-delay/88409 "2024-04-05T10:14:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bowsal\_G](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@Bowsal\_G](https://forum.inductiveautomation.com/u/Bowsal_G)\
**Post date:** [April 5, 2024, 10:14am UTC](https://forum.inductiveautomation.com/t/script-execution-delay/88409/1 "2024-04-05T10:14:27Z")

</div>

I encountered an issue while running my gateway script triggered by the tag value. During script execution, I experienced a time delay issue(the script usually runs in 700-800 ms. but for every 8 mints it takes 20 sec to execute).

I have attached my script here. Please check & help me to resolve ...

if you see the script the line "BandValdStart = system.date.now()" and " Bandprinted = system.date.format(Bandprinted, "yyyy-MM-dd HH:mm:ss.SSS")" got delay everytime. API is not taking time. but there is not much in between this lines, still why it takes delay to execute?

why this happens at 8 mint regular interview? If i do the script in label also i am facing the same issue.

I would appreciate your suggestions...  
[MyGatewayscript.py](https://forum.inductiveautomation.com/uploads/short-url/x4KpgBcPE17RH3gcM9epT0l321Y.py) (25.4 KB)
