Introduction
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
andrm
, 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 CopyFileJob or
- to specify the
com.sos.jitl.jobs.file.CopyFileJob
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.
- Example: The
- Arguments that have to be specified with the job configuration.
- 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 value22
, therefore theport
argument is not required.
- To connect to a remote host, the
- Example 2: not required
- The
proxy_host
argument is used only if the job's connection makes use of a proxy.
- The
- Example 1: technically required, but available from default value
- Arguments that are not required or arguments that are technically required but are available from default values.
The com.sos.jitl.jobs.ssh.SSHJJob
class accepts the following arguments:
Name | Required | Default Value | Purpose | Example |
---|---|---|---|---|
host | yes | This argument specifies the hostname or IP address of the SSH server to which a connection is to be made. | ||
| yes | This argument specifies the user account to be used when connecting to the SSH server. | ||
port | no | 22 | This argument specifies the port number of the SSH server. | |
auth_method | no | publickey | This argument specifies the authentication method for the SSH server - the publickey and password methods are supported. The path name of the private key file is specified with the | |
password | no | This argument specifies the user account's password for authentication by the SSH server and has to be specified if the password authentication method is specified with the | ||
auth_file | no | This argument specifies the path and name of a private key file used for authentication with an SSH server. This argument has to be specified if the publickey authentication method is specified with the | ||
command_delimiter | no | %% | Command delimiter characters can be specified using this argument. The delimiters are used in command arguments to separate multiple commands. The commands can be executed in separate SSH sessions. | |
command | no | This argument specifies a command that should be executed on the SSH server. Multiple commands can be separated by the command delimiter that is specified using the | ||
command_script | no | This argument can be used as an alternative to | ||
command_script_file | no | This argument can be used as an alternative to The SSH Job can transfer a command script file to the remote host only if SFTP is allowed on the remote SSH Server. | ||
command_script_param | no | This argument contains an argument string that will be appended when a | ||
proxy_host | no | The value of this argument is the host name or the IP address of a proxy used to establish the connection to the SSH server. Use of a proxy is optional. | ||
proxy_port | no | This argument specifies the port number of a proxy that is used to establish the connection to the SSH server. | ||
proxy_user | no | The value of this argument specifies the user account for authentication with the proxy server that is used to connect to the SSH server. | ||
proxy_password | no | This argument specifies the password for the proxy server user account if a proxy is used to connect to the SSH server. | ||
ignore_error | no | false | If the value of this argument is set to | |
ignore_exit_code | no | This argument is used to specify one or more exit codes that will not be considered as errors. Multiple exit codes can be defined using comma separated values or using ranges. |
| |
ignore_signal | no | If the value of this argument is set to | ||
ignore_stderr | no | This job checks if any output to stderr has been created by a command that is executed on the SSH server and reports such output as an error. | ||
simulate_shell | no | If this value is set to | ||
simulate_shell_prompt_trigger | no | 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 then timeout arguments have to be used. | ||
simulate_shell_inactiity_timeout | no | If this argument is set then the job will assume that the command has been carried out and that the shell is waiting for commands if no new characters are written to stdout or stderr after the given number of milliseconds. |