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
Rajesh
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
Rajesh
You could use system.util.execute
to directly run the gwcmd
utility.
https://docs.inductiveautomation.com/display/DOC81/Gateway+Command-line+Utility+-+gwcmd
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.
Thanks for the response @PGriffith.
Thanks for the suggestion @witman
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
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?