ssched

submit tasks through Session Scheduler

Synopsis

ssched [options] command
ssched [options] -tasks task_definition_file
ssched [options] -tasks task_definition_file command
ssched [-h | -V]

Description

Options can be specified on the ssched command line or on a line in a task definition file. If specified on the command line, the option applies to all tasks, whether specified on the command line or in a file. Options specified in a file apply only to the command on that line. Options in the task definition file override the same option specified on the command line.

ssched exit codes

0
All tasks completed normally
1
An unspecified error occurred
3
All tasks completed, but some tasks have a non-zero exit code
4
Error parsing ssched command line parameters or tasks definition file. No tasks were run.
5
Exceeded the SSCHED_MAX_TASKS limit

Task Definition File Format

The task definition file is an ASCII file. Each line represents one task, or an array of tasks. Each line has the following format:
[task_options] command [arguments]

Command options

-1 | -2 | -3

Enables increasing amounts of debug output

-C

Sanity check all parameters and the task definition file. Exit immediately after the check is complete. An exit code of 0 indicates no errors were found. Any non-zero exit code indicates an error. ssched -C can be run outside of LSF.

-p

Do not delete the temporary working directory. This option is useful when diagnosing errors.

Task options

-E "pre_exec_command [arguments ...]"

Start of changeRuns the specified job-based pre-execution command on the execution host before actually running the task.End of change

The task pre-execution behavior mimics the behavior of LSF job pre-execution. However, the task pre-execution command cannot run as root.

The standard input and output for the pre-execution command are directed to the same files as the job. The pre-execution command runs under the same user ID, environment, home, and working directory as the job. If the pre-execution command is not in the user's usual execution path (the $PATH variable), the full path name of the command must be specified.

-Ep "post_exec_command [arguments ...]"

Start of changeRuns the specified job-based post-execution command on the execution host after the task finishes.End of change

The task post-execution behavior mimics the behavior of LSF job post-execution. However, the task post-execution command cannot run as root.

If the post-execution command is not in the user's usual execution path (the $PATH variable), the full path name of the command must be specified.

-e error_file

Specify a file path. Appends the standard error output of the job to the specified file.

If the parameter LSB_STDOUT_DIRECT in lsf.conf is set to Y or y, the standard error output of a task is written to the file you specify as the job runs. If LSB_STDOUT_DIRECT is not set, standard error output of a task is written to a temporary file and copied to the specified file after the task finishes.

You can use the special characters %J, %I, %T, %X in the name of the input file. %J is replaced by the job ID. %I is replaced by the job array index, %T is replaced with the task ID, and %X is replaced by the task array index.

If the current working directory is not accessible on the execution host after the job starts, Session Scheduler writes the standard error output file to /tmp/.

Note: The file path can contain up to 4094 characters including the directory, file name, and expanded values for %J, %I, %T and %X
-i input_file

Gets the standard input for the job from specified file. Specify an absolute or relative path. The input file can be any type of file, though it is typically a shell script text file.

If -i is not specified, standard input defaults to /dev/null.

You can use the special characters %J, %I, %T, %X in the name of the input file. %J is replaced by the job ID. %I is replaced by the job array index, %T is replaced with the task ID, and %X is replaced by the task array index.

Note: The file path can contain up to 4094 characters including the directory, file name, and expanded values for %J, %I, %T and %X
-J task_name[ index_list]

Specifies the indices of the task array. The index list must be enclosed in square brackets. The index list is a comma-separated list whose elements have the syntax start[-end[:step]] where start, end and step are positive integers. If the step is omitted, a step of one is assumed. The task array index starts at one.

All tasks in the array share the same option parameters. Each element of the array is distinguished by its array index.

-j "starter [starter] ['%USRCMD'] [starter]"

Task job starter. Creates a specific environment for submitted tasks prior to execution.

The job starter is any executable that can be used to start the task (that is, it can accept the task as an input argument). Optionally, additional strings can be specified.

By default, the user commands run after the job starter. A special string, %USRCMD, can be used to represent the position of the user's task in the job starter command line. The %USRCMD string may be followed by additional commands.

-o output_file

Specify a file path. Appends the standard output of the task to the specified file. The default is to output to the same stdout as the ssched command.

If only a file name is specified, LSF writes the output file to the current working directory. If the current working directory is not accessible on the execution host after the task starts, LSF writes the standard output file to /tmp/.

If the parameter LSB_STDOUT_DIRECT in lsf.conf is set to Y or y, the standard output of a task is written to the file you specify as the task runs. If LSB_STDOUT_DIRECT is not set, it is written to a temporary file and copied to the specified file after the task finishes.

You can use the special characters %J, %I, %T, %X in the name of the input file. %J is replaced by the job ID. %I is replaced by the job array index, %T is replaced with the task ID, and %X is replaced by the task array index.

Note: The file path can contain up to 4094 characters including the directory, file name, and expanded values for %J, %I, %T and %X
-M mem_limit

Sets a per-process (soft) memory limit for all the processes that belong to the task (see getrlimit(2)).

By default, the limit is specified in KB. Use LSF_UNIT_FOR_LIMITS in lsf.conf to specify a larger unit for the limit (MB, GB, TB, PB, or EB).

You should only set a task level memory limit if it less than the job limit.

-Q "exit_code ..."

Task requeue exit values. Enables automatic task requeue and sets the LSB_EXIT_REQUEUE environment variable. Separate multiple exit codes with spaces. The output from the failed run is not saved, and the user is not notified by LSF.

-W [minutes:]seconds

Sets the run time limit of the task. If a task runs longer than the specified run limit, the task is sent a SIGKILL signal.

The run limit is in the form of [minutes:]seconds. The seconds can be specified as a number greater than 59. For example, three and a half minutes can either be specified as 3:30, or 210. The run limit you specify is the absolute run time.

-tasks task_definition_file

Specify tasks through a task definition file.

command [argument]

The command can be anything that is provided to a UNIX Bourne shell (see sh(1)). The command is assumed to begin with the first word that is not part of a option. All arguments that follow command are provided as the arguments to the command.

The job command can be up to 4094 characters long.

-h

Prints command usage to stderr and exits.

-V

Prints release version to stderr and exits.

See also

ssacct, lsb.params