Gateway Startup Scripts Threading

Hello,
does a Gateway Startup Script block other Events from happening or is it executed in a dedicated thread?

Use case:
I have a project which calculates machine stats and, on a server restarts, I encounter some troubles getting all initials calculations to database. Most calculations are done with a UDT. I think the problem is that tag providers and gateway event handle are started simultaneously and not in a dedicated order.
As a solution I want to use a Gateway Startup Script to check if all actors (devices, database connections, ....) are available and then send the initial machine stats and afterwards, let the existing logic do the job.
If the stats are more than once in the database, it is not a problem, the following processes can handle these cases, but if the initial stats are missing, we must rework that by hand.

Thanks in advance!
Gerald

Gateway startup scripts should not be treated as 'blocking', and will also run a lot more often than just "when the gateway starts up" - they're going to run every time most scripting related resource configuration changes. To wit: If you change your project script library X, we'll fire your startup script again, because it might have pulled in X and be using it in some way.

1 Like