Verb Invoker & VB Script
Hi,
I have used a script to stop a service on another machine(same netwok). Created inside the "scripting aspect" of 800xA.
Script:
Function PRIINIT()
set wshNetwork = Createobject("Wscript.Network")
NodeName = wshNetwork.ComputerName
if left(NodeName,3) = "CS1" then
set ashell = createobject("wscript.shell")
ashell.run "sc stop tomkat"
end if
end function
Then I created a graphic element with verb invoker (element hosted input) inside.
Configure verb invoker to run the script automatically through a variable.
I saw the scrpt is not running automatically even the condition meet. Always
I can run the script manually.
Then I added the graphic element to the application bar of operator workplace.
Now I can see the script is always running automatically on another machine when the operator workplace is open.
I want to take out the dependency to the operator workplace. Any idea how I can do it ? I want to run the script even when the operator work place is closed.
Answers
Hello,
why don't you run the script from Windows Scheduler on "CS1" ?
/Ronny
It really sounds like you are going around in circles trying to fix a problem that really should be addressed by your OPC tunnelling software. You should NOT need to be restarting services because an OPC data quality value has gone bad.
What specifically is the root problem you are trying to solve ?
If you are having problems with a redundant connection to a single OPC server not failing over correctly then you need to address why this connection either doesn't fail over, or whether your remote OPC server can even support what you are trying to do.
Of course, you are much more familiar with your problem than I am, but my instinct is that your approach is wrong. You should not be trying to resolve your problems by writing logic to restart services. These services should work properly without your intervention.
You can use the calculation Aspect. And write the script in there.
The calculation Aspect you can run cyclic. It's executed by the service in the service structure.
Add new comment