This method checks the execution state of a remote script evaluation. Execution is considered complete if the abort() call ends execution, if an error occurs during processing, or if the script is successfully run on the target node. Find out if execution completes successfully or an error occurs using the errorOccurred() and getError() methods.
This method has the following syntax:
hasCompleted()
The method returns the following values:
Execution complete.
Execution is not complete.
Example
Manually implement a wait for completion.
aRT = run-remote "! ver" on "ascli1" while(!aRT[0].hasCompleted()) { sleep(500); } if(aRT[0].errorOccurred()) { ? "Error" } else { ? "Result:", get-remoteResult(aRT[0]) }
Usually scripts only use the -wait option of the run-remote command.
Copyright © 2013 CA. All rights reserved. |
|