Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Command Reference


ajsrerun

Organization of this page

Format

ajsrerun
     [-F service-name]
     [-B execution-registration-number]
     [{-t|-s|-n|-a|-w|-f|-p|-e}]
     [-h]
     [-c]
     [-rr [-rn number-of-retry-executions] [-ri retry-interval]]
     [-R]
     [-E]
     [-T]
     [-N|-J]
     [-X {yes|no|auto}]
     job-name-or-jobnet-name-or-job-group-name...

Description

Re-executes a jobnet. (Upon re-execution specification, the jobnet is executed immediately.) You can place a jobnet or job in the hold state and re-execute it later.

Execution privileges

You must have any of the following JP1 privileges:

-F service-name

Specify the name of the target scheduler service.

You can specify a character string of 1 to 30 bytes.

-B execution-registration-number

Specify the execution registration number of the jobnet you want to re-execute in the YYYYMMDDNNN format. The following gives the contents of YYYYMMDDNNN.

YYYY: Year of the date of execution

MM: Month of the date of execution

DD: Day of the date of execution

NNN: Execution registration sequence number for the date of execution

For details of the execution registration number, see 4.5.13 Methods of specifying generations when executing commands in the manual JP1/Automatic Job Management System 3 Overview.

-t

Re-executes the jobnet from the top.

You can also re-execute a jobnet which has ended normally or ended with warning.

You can specify this option only in the root jobnet.

-s

Re-executes the jobnets directly under which jobs that terminated abnormally are included.

You can specify this option only in the root jobnet.

-n

Re-executes the jobs from the next job of an abnormally ended one.

You can specify this option only in the root jobnet.

-a

Re-executes the jobs from an abnormally ended one.

You can specify this option only in the root jobnet.

-w

Re-executes a job ended with warning.

If the re-execution of a job which has ended with warning results in an abnormal end, you can further re-execute the job as a job ended with warning. (For example, job A has ended with warning and you re-execute the job (first re-execution). If job A terminates abnormally during the first re-execution, you can specify the -w option to further re-execute job A (second re-execution).

You can specify this option only in the root jobnet.

-f

Starts re-execution by first re-executing a specified jobnet or job.

-p

Re-executes a specified jobnet or job.

-e

Re-executes the jobnets or jobs from the next jobnet or job of a specified one.

You cannot specify this option for the root jobnet. You cannot specify this option with the -h option.

-h

Temporarily holds and then re-executes the target job or jobnet.

You cannot specify this option for jobnet connector. You cannot specify this option with the -e option.

-c

Re-executes an abnormal preceding job or jobnet after placing it in the "ended with warning" status.

-rr

Specify this option if re-execution of a target unit needs to be retried when the unit is not in the end status. When a unit ends abnormally, this option can be used to immediately run the ajsrerun command for the succeeding unit.

If multiple units are specified, this command retries re-execution of the units one at a time. The next retry does not start until the current retry ends.

Specifying a root jobnet causes this command to end abnormally.

Note that it is possible that this command will not retry re-execution of a target unit due to some factor other than the state of the target unit. For example, when the root jobnet of a target unit is suspended.

For details on rerunning a unit, see 4.5.11 Rerunning a job or jobnet in the manual JP1/Automatic Job Management System 3 Overview. For examples of using the -rr option, see 2.4.6 Executing a specific process when a job ends abnormally (example of defining a jobnet that uses a recovery unit) in the JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide.

-rn number-of-retry-executions

Specify the number of retry executions. You can specify a value between 1 and 10.

You must specify this option with the -rr options. If you omit this option, the system assumes 6.

-ri retry-interval

Specify the retry interval. You can specify a value between 2 and 60 (seconds).

You must specify this option with the -rr options. If you omit this option, the system assumes 10.

-R

Re-executes all jobnets and jobs contained in the specified unit.

If you specify this option with the -E and/or -T options, the system re-executes jobnets and jobs according to the specification of each option.

-E

Re-executes a jobnet registered for execution.

-T

Re-executes the root jobnet.

-N

Starts re-execution by first re-executing a jobnet.

-J

Starts re-execution by first re-executing a job.

-X {yes|no|auto}

Specify whether to automatically select the current unit for operation from the units listed in a planning group. The units in the job group are not, however, automatically selected regardless of the specified value. You cannot omit a root jobnet name.

  • yes

    Specify this to automatically select a target unit.

    When specifying a unit name in the command, omit a root jobnet name in a planning group.

  • no

    Specify this if you do not want to automatically select a target unit.

    You must specify a unit for which the command will operate. You cannot omit a root jobnet name in a planning group.

  • auto

    Whether a target unit will automatically be selected depends on how the unit name is specified.

    • If you want to automatically select a target unit

      Specify a unit name without a root jobnet name in a planning group.

    • If you do not want to automatically select a target unit

      Specify a unit name with a root jobnet name in a planning group. The command will operate for the specified unit only. However, if there is a unit having the same name as the path name specified without a root jobnet name in a planning group, a root jobnet name is assumed to be omitted so that a target unit will be selected automatically.

job-name-or-jobnet-name-or-job-group-name

Specify the name of the job or jobnet you want to re-execute. You can also specify a job, jobnet, or job group name with the -R, -E, or -T option.

You can specify a character string of 1 to 930 bytes.

You can specify more than one job, jobnet, or job group name. You cannot specify a manager job group name or manager jobnet name.

You can specify a logical host name or execution ID as a job, jobnet, or job group name. If you specify an execution ID, however, the -B option is disabled. For details about how to specify the execution ID, see 1.1 Command syntax.

Notes

Return values

0

Normal end

Multiple of 4 within the range from 4 to 124

Abnormal end

Additional information

If you attempt to re-execute a jobnet which ended on or before the previous day, schedule information for the previous execution is applied to this re-execution. The following gives an example of the re-execution.

Example:

Jobnet A that is executed every day and jobnet B that is executed only on Friday are operated as one jobnet X.

Because jobnet A ended abnormally on Thursday, however, this jobnet is re-executed on Friday.

In this example, only jobnet A is executed on Friday. As definition information for the previous execution (on Thursday) applies to the re-execution, jobnet B scheduled to be executed only on Friday is not executed.

Example

The following command re-executes the jobnet (net1) interrupted by the ajsintrpt command from the top.

ajsrerun -t net1