Terminate Dormant Sessions Scripting

Is there any way to kill a dormant session through scripting?

I have a client message handler on our project called terminate.
When you have the client sessionID you can call the message handler using that ID and it will run system.util.exit(1).
This works great from an HMI where i have all the client IDs from system.util.getSessionInfo() but when the client is in a dormant state this does not work.
Which it probably doesn’t work because it can’t reach it and get a successful response that the message handler executed successfully.

Now from the gateway you can terminate dormant sessions from the status page -> vision clients.
This works great for me when i’m available.
I need a way to kill this in the gateway via a timer script or tag change script on the gateway side where a user writes a client ID to a tag and the gateway runs a script on that tag using the value as a parameter to terminate that session.

Anyone have any ideas?

I was able to figure this out with a Gateway scoped script that can be found here.

Killing a Dormant Session in an Ignition HMI

hi, I am trying to do something similar... is there any way to close the session of a Client (VISION) by means of a script?

The original link seems to be dead, but fortunately there seems to be a companion article up on Medium, although it doesn't contain the full script.

In case this ever goes down as well, I'm going to quote the key paragraph here: