ProjectManager Project start order?

What order are projects started in when the Gateway restarts?
I would like a specific project to start up before anything else.


My guess would be the order of the primary key in the projects table of the internal database. Or they are started in parallel. You could check by writing the project name and current time to a logger.

It appears (from a quick glance at the source) that they’re ordered by name.

It looks that way from the ProjectManager point of view, but then the order is different when looking at timing from Gateway startup scripts.


The order the startup scripts are run is (effectively) non-deterministic.

Hmmm, OK.

Place the code you want executed first in a shared script, at the top level (not in a function) so it will be executed on import of that script. Have all of your projects define a gateway startup script whose very first line calls an empty function in that shared script. Then it doesn’t matter which project starts first.

I used a Java Timer and TimerTask to delay.