Versions Compared

Key

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

Table of Contents

Introduction

  • The JS7 - JITL CopyFileJob implements an SSH client (Secure Shell) and allows to execute shell code, scripts and programs on a remote host without a JS7 Agent being installed on that host. As a prerequisite the remote host has to operate an SSH server.

  • The SSHJob allows execution on Unix and Windows systems.

    • Unix based operating systems generally provide an SSH client, while Windows operating systems by default do not.
  • The beauty of SSH is its simplicity. It allows public/private key authentication and is well suited to execute programs for specific accounts.
    • The JITL SSHJob allows shell scripts to add return values to orders.
  • One of the restrictions of SSH connections is that there is limited control of child processes on the remote host. 
    • If a number of child processes are spawned by a program during an SSH session and that session is aborted then child processes will continue to run.
  • For Windows operating systems hardly any products with decent SSH server capabilities are available, therefore use of JS7 Agents for Windows is preferable.
  • The JITL CopyFileJob job copies one or more files. The job belongs to the category of JS7 - JITL File Operation Jobs.

  • The JITL File Operation Jobs support commonly used operations such as copy, rename, move, delete and check existence of files. Any file operations are implemented with Java and are available for any OS platforms supported by JS7 Agents. In comparison with operating system commands like copy, cp, move, mv, del and rm, that behave differently on different operating systems, the handling and behavior of File Operation Jobs is identical for all supported operating systems.

  • Most File Operation Jobs support "regular expressions" to allow filtering of matching file names.

  • File Operation Jobs are frequently used in workflows to check the existence of files, to rename files and to transfer files to different locations.




Usage

When defining the job consider

  • to use the Wizard that is available from the job properties tab in the Configuration view ,and to select the JITL job class and CopyFileJob or
  • to specify the com.sos.jitl.jobs.sshfile.SSHJobCopyFileJob Java class name.


Example

A minimal SSHJob configuration can look like this:


Arguments

Job Documentation: https://www.sos-berlin.com/doc/JS7-JITL/CopyFileJob.xml

  • Required Arguments
    • Arguments that have to be specified with the job configuration.
      • Example: The  host argument is required to run a job that connects to a remote host.
  • Optional Arguments
    • Arguments that are not required or arguments that are technically required but are available from default values.
      • Example 1: technically required, but available from default value
        • To connect to a remote host, the  port argument is required. The argument is available from the default value 22, therefore the port argument is not required.
      • Example 2: not required
        • The proxy_host argument is used only if the job's connection makes use of a proxy.

...