# Delay in Gateway Startup Script Not working

**URL:** <https://forum.inductiveautomation.com/t/delay-in-gateway-startup-script-not-working/71084>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [March 15, 2023, 10:51am UTC](https://forum.inductiveautomation.com/t/delay-in-gateway-startup-script-not-working/71084 "2023-03-15T10:51:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ali\_Ali](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@Ali\_Ali](https://forum.inductiveautomation.com/u/Ali_Ali)\
**Post date:** [March 15, 2023, 10:51am UTC](https://forum.inductiveautomation.com/t/delay-in-gateway-startup-script-not-working/71084/1 "2023-03-15T10:51:42Z")

</div>

Hello All,

I have a very simple script that I need to run in the Gateway Startup. I only want to write to some tags. The script does not run, so that the script run faster than the Tag Provider load or something. So, I tried using threading Timer to delay my script, but I does not run at all no matter how much delay.  
My script:

```auto
import threading
from threading import Timer

def initStations():
	system.tag.write("[TagProvider]PumpStations/Station1/Pump1/Ready", True)
	
Timer(60.0, initStations).start()

```

Note: without the delay, the script runs only if I modify it and save the project (initial change), but still does not run when I stop and start my server (from windows services \> Ignition \> Stop, then Start).

Thanks in advance.
