When a host script is scheduled, it is run in the scheduler environment. Therefore, a UNIX scheduler must be available to run a UNIX script and only a Windows scheduler can run a Windows script.

It is important to set the connection on the Properties screen for the script.

Right-click on the host script in the left pane and select Properties.

Set the Connection Name to either Windows or Unix and then click OK.

Note

If you fail to set the default connection for the host script, you will receive a return message of Invalid Host Type when the host script is executed.

There are a number of conventions that must be followed if a host script is to be used by the WhereScape RED scheduler. These conventions are:

  1. The first line of data in 'standard out' must contain the resultant status of the script. Valid values are '1' to indicate success, '-1' to indicate a warning condition occurred but the result is considered a success, '-2' to indicate a handled error occurred and subsequent dependent tasks should be held, -3 to indicate an unhandled Failure and that subsequent dependent tasks should be held.
  2. The second line of data in 'standard out' must contain a resultant message of no more than 256 characters.
  3. Any subsequent lines in 'standard out' are considered informational and are recorded in the audit trail. The normal practice is to place a minimum of information in the audit trail. All bulk information should be output to 'standard error'.
  4. Any data output to 'standard error' is written to the error/detail log. Both the audit log and detail log can be viewed from the scheduler window.
  • No labels