Os4xrestart

From OS4X
Jump to navigation Jump to search

Binary

The program to restart an OS4X job is installed in the configure binary installation directory (default: /opt/os4x/bin/). The name is "os4xrestart".

Syntax

If you start the program without any parameters, it displays its syntax:

os4x:~ $ /opt/os4x/bin/os4xrestart
OS4X restart plugin v3.0

Usage: /opt/os4x/bin/os4xrestart <jobnumber|xml_file> [0|1: from scratch] [stepNumber, default: 0 (only, if from scratch is disabled)]

Parameters explained:

  • 1: job number or XML file: the job number must be a numeric decimal value without proceeding zeroes. If no job number is extracted from this parameter, the parameter is treated as a file parameter. The file will be interpreted as OS4X job XML, where in the XPath "/OS4X_job/job_information/job_number" the job number will be extrated.
  • (optional) 2: value 0 or 1: restart job from scratch. This option is only valid for incoming jobs, where the configured "default receive plugin group" will be executed before the extracted recipient's plugin group.
  • (optional) 3: step number: if the job is not restarted from scratch (see parameter 2), it is possible to restart a job from a given plugin index. This is the step number, beginning from 1 in the extracted plugin group of the job recipient.

Behaviour

If the job to be canceled is in a state of "waiting for asynchronous plugin", the asynchronous plugin will be called with the cancel option ("-c") so it can cleanup its working files correctly. Afterwards, the job is being restarted and plugin execution will be done. The program "os4xrestart" will not wait until the plugin group is finished, it forks a child process which runs independantly.

Licensing

A valid OS4X Enterprise (Lite) license is required.

Requirements

  • The job number must exist, of the job XML must contain an extractable job number.
  • The job must be linked to a valid initial job XML (which is not the case for unfinished receive jobs).
  • The recipient of the job must have a configured plugin group according to the direction of the job.