Terminate a running script in gateway

Hi All,
Is there any way to terminate a running script ?
i was testing a script with system.util.invokeAsynchronous function .
i have disabled all my codes and tag change properties,but still the script is running .

You could try opening a console and pressing Ctrl+C

I’ve seen that mentioned in a few other forum posts

i am not running from script console.
i have written my script inside project library and triggered using a tag change.

There is no safe way. If you can get a reference to the thread, you can use .interrupt(). But that is not assured due to the nature of java threads.

You must design your long-running threads to be interruptible, or to automatically die after a time limit, or some other housekeeping method. This is also required to prevent memory leaks when code changes.

In the meantime, you will probably have to restart the gateway.

1 Like

The easiest way is absolutely to restart the gateway.

That said, some changes we made in the 8.X line might make this possible, depending on your exact version: