Tag gateway initialization

In a Perspective project I have some global state variables leaning back on some memory tags. I need those tags to be initialized on they’re default state when the gateway restarts: I was thinking to implement the initialization in some system tag’s event change script, for example the [System]Gateway/UptimeSeconds tag, but wondering if is there any other way to do that?
Many thanks in advance,
Francesco

How about the gateway startup event?
https://docs.inductiveautomation.com/display/DOC81/Gateway+Event+Scripts#GatewayEventScripts-StartupScript

It re-runs when you edit the project. Placing a flag in the global dictionary is an option. But not for 8.0. Related:

Ah, yes, I remember now. I had put such things in their own project for that very reason.

I remembered there was somewhere the startup event script but couldn’t find it, many thanks :slight_smile:
Also, it seems that the script reruns on project save only when scripts are modified, fortunately it’s not a problem for me.