Cause of logs (Restarting gateway scripts)

I use a Gateway Script through Tag Change, a log is created in a DB, but reviewing the saved data I noticed that 2 logs were created that should not be, looking at the Logs I noticed that at 11:51:01 and 11:51:47 the Log is executed: Restarting gateway scripts....

How can I prevent the Log: Restarting gateway scripts from executing?

imagen

You cannot prevent this. Gateway scripts must restart when a project is edited and saved.

In a tag change event, inspect the initialChange boolean in your logic to handle this case specially.

That is to say that when I make a change in any Gateway Script it would be restarted and therefore all the Gateway Scripts would be executed again?

Yes. When you save the project.

In v7.9, changes to shared scripts will make this happen in all projects. This is true even if you are using Staging mode, which only applies to Vision GUI resources.

In v8+, changes to scripts in inheritable projects will make this happen in all projects that inherit them.

2 Likes