Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This document describes the functionality of the JobSchedulerSSHJob and the parameters to configure the Job properly. Additionaly this document provides a minimal example for a SSH Job configuration.

Example

A minimal SSH Job configuration

Excerpt
Code Block
languagexml
titleSimple SSH Job
collapsetrue
<?xml version="1.0" encoding="ISO-8859-1"?>
<job title="Launch remote commands or executable files by SSH" stop_on_error="no">
    <description >
        <include  file="jobs/JobSchedulerSSHJob.xml"/>
    </description>
    <params >
        <param  name="host" value="HOSTNAME"/>
        <param  name="port" value="22"/>
        <param  name="user" value="USERNAME"/>
        <param  name="password" value="PASSWORD"/>
        <param  name="auth_method" value="password"/>
        <param  name="command" value="printenv"/>
    </params>
    <script  language="java" java_class="sos.scheduler.job.SOSSSHJob2JSAdapter"/>
    <run_time />
</job>

Parameters

There are three types of parameters:

...

  • default value:
    • empty
  • description
    • This parameter specifies the port number of the proxy, should a proxy be used to create the connection to the SSH server.

proxy_user

  • default value:
    • empty
  • description
    • The value of this parameter specifies the user account for authorization by the proxy server should a proxy be used to connect to the SSH server.

proxy_password

  • default value:
    • empty
  • description
    • This parameter specifies the password for the proxy server user account, should a proxy be used to connect to the SSH server.

command_script_param

  • default value:
    • empty
  • description
    • This parameter contains a parameterstring, which will be appended when calling the command_script or the command_script_file.

ignore_error

  • default value:
    • false
  • description
    • If the value true is set, then execution errors caused by commands on the SSH server are ignored. Otherwise such execution errors for jobs and orders are reported by the Job Scheduler.

ignore_exit_code

  • default value:
    • empty
  • description
    • This parameter configures one or more exit codes which will not be treated as errors. Multiple exit codes can be defined comma seperated or using ranges.
  • examples:
    • 255
    • 2,3,4,100
    • 4,50-60,210-220

ignore_signal

  • default value:
    • false
  • description
    • If the value true is set, then on Unix systems all signals will be ignored that terminate the execution of a command on the SSH server - if for example a command is terminated using kill. 
      Note that by default the Job Scheduler reports errors for commands that are terminated by signals.

ignore_stderr

  • default value:
    • false
  • description
    • This job checks if any output to stderr has been created by a command that is being executed on the SSH server and reports this as an error. 
      If the value true is set, then output to stderr will not be reported as an error by the Job Scheduler.

simulate_shell

  • default value:
    • false
  • description
    • If the value true is set, then a login to a shell is simulated to execute commands. Some scripts may cause problems if no shell is present.

simulate_shell_prompt_trigger

  • default value:
    • empty
  • description
    • The expected command line prompt. Using this prompt the job tries to find out if commands may be entered or have been carried out. If no prompt can be configured, timeout parameters have to be used.

simulate_shell_login_timeout

  • default value:
    • empty
  • description
    • If no new characters are written to stdout or stderr after the given number of milliseconds, the job assumes that that the login has been carried out and the shell is waiting for commands.

simulate_shell_inactivity_timeout

  • default value:
    • empty
  • description
    • If no new characters are written to stdout or stderr after the given number of milliseconds, the job assumes that that the command has been carried out and the shell is waiting for commands.

Example

Example 1: A minimal SSH Job configuration

Excerpt
Code Block
languagexml
titleSimple SSH Job
collapsetrue
<?xml version="1.0" encoding="ISO-8859-1"?>
<job title="Launch remote commands or executable files by SSH" stop_on_error="no">
    <description >
        <include  file="jobs/JobSchedulerSSHJob.xml"/>
    </description>
    <params >
        <param  name="host" value="HOSTNAME"/>
        <param  name="port" value="22"/>
        <param  name="user" value="USERNAME"/>
        <param  name="password" value="PASSWORD"/>
        <param  name="auth_method" value="password"/>
        <param  name="command" value="printenv"/>
    </params>
    <script  language="java" java_class="sos.scheduler.job.SOSSSHJob2JSAdapter"/>
    <run_time />
</job>

...