Restart Ignition Gateway service and shutdown the gateway system from perspective client

Hi All,

I have a requirement for Restarting the Gateway service and also shutdown the Gateway server from perspective client using button click.

If any one knows this, can you please post the script .

Thanks in advance

You could use system.util.execute to directly run the gwcmd utility.

This is a pretty bad idea, I would say, but that’s probably where I’d start.


Send a message from client to gateway and use system.util.execute in the gateway message handler as @PGriffith noted.

1 Like

Thanks for the response @PGriffith.

Thanks for the suggestion @witman :slight_smile:

Thanks @witman, I was able to write a batch file code as below, and ran it from Gateway scope message handler, and it worked for me, I can able to restart the gateway from perspective button click.

@echo off
set dirpath=%~dp0
cd “C:/Program Files/Inductive Automation/Ignition”
echo Restart gateway…
gwcmd -r

1 Like

Is this applicable with systems that have redundancy configured?
I want to restart the backup gateway service whenever the sync between master and backup goes "Out-of-Date". Is it possible to modify this so that I can use it to restart just my backup gateway service?