Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Overview


4.5.11 Rerunning a job or jobnet

You can specify the execution results of a jobnet or job that has completed execution, and rerun it.

There are two methods of rerunning a job or jobnet. You can rerun the root jobnet, or rerun a nested jobnet or job. These methods are described below.

To this operation, you can use JP1/AJS3 - View, the Web GUI, the API function to rerun, or the ajsrerun command. For details on using JP1/AJS3 - View, see 9.11 Re-executing jobnets and jobs in the JP1/Automatic Job Management System 3 Operator's Guide. For details on using Web GUI, see 16.10 Rerun dialog box in the JP1/Automatic Job Management System 3 Operator's Guide. For details on using the rerun API, see 7.1.18 Rerun API in the manual JP1/Automatic Job Management System 3 Command Reference. Alternatively, for details on the ajsrerun command, see the description of ajsrerun in 3. Commands Used for Normal Operations in the manual JP1/Automatic Job Management System 3 Command Reference.

Supplementary notes
  • For details about rerunning a jobnet when the execution sequence of the root jobnet is controlled using a jobnet connector, see 2.2.4(5) Re-execution of jobnet connectors and connection-destination jobnets in the JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide.

  • For details about re-executing a jobnet when the execution sequence of the unit is controlled by using wait conditions, see the following subsection: 2.2.5 Using wait conditions to control the order of unit execution in the JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide

Organization of this subsection

(1) Rerun the root jobnet

You can choose one of the following rerun methods when you rerun a root jobnet.

From abnormally ended job

This method reruns from an abnormally ended job. Even if a job that terminated abnormally is preceded by a job that ended normally, the job that ended normally is not rerun.

If the rerun job ends normally, succeeding jobs are executed and processing continues.

When a nested jobnet has ended abnormally, you can rerun from the specific job in the nested jobnet that ended abnormally.

From after abnormally ended job

This method reruns from the job that follows the abnormally ended job.

When a nested jobnet has ended abnormally, you can rerun from the job that follows the job that ended abnormally in the nested jobnet.

From abnormally ended jobnet

This method reruns from the jobnets directly under which jobs that terminated abnormally are included.

Even if the jobs directly under a nested jobnet include both jobs that terminated abnormally and jobs that ended normally, all jobs directly under the nested jobnet are rerun along with their succeeding units.

If there are any jobs that terminated abnormally directly under the root jobnet, the entire root jobnet is rerun.

From top of jobnet

This method reruns from the top of the root jobnet.

Only jobs that ended with warning

This method reruns only jobs that ended with a warning. When a nested jobnet is defined, you can rerun the jobs that ended with a warning in the nested jobnet.

In addition, rerun jobs that have ended once with a warning and then terminated abnormally when they were rerun.

(2) Rerun a nested jobnet or job

You can choose from the following methods to rerun a nested jobnet or job.

From the specified jobnet or job

This method reruns from the specified jobnet or job. If the rerun jobnet or job ends normally, succeeding jobs are executed and processing continues.

From the job after the specified jobnet or job

This method reruns from the job that follows the specified job or nested jobnet.

Only the specified jobnet or job

This method reruns only the specified job or nested jobnet.

Rerunning a jobnet or job results in an error in the following cases:

In the following cases, attempting to execute a job or jobnet does not result in an error but they will not execute:

(3) The job preceding a judgment job ended abnormally

When the job preceding a judgment job ends abnormally, you can rerun that preceding job as follows.

#1

Behavior when rerunning from the next unit whose preceding job was ended abnormally:

  • When a job preceding a judgment job ends abnormally, if you rerun the jobnet from the job subsequent to the job that terminated abnormally, the status of the job that terminated abnormally changes to Ended normally, and the execution of processing begins from the next judgment job.

  • When the judgment job makes a judgment using the return code of the preceding job, it uses the return code from when the preceding job ended abnormally.

#2

This applies to the preceding job that ended abnormally because it was re- executed after it ended with a warning.

(4) Re-executing the dependent unit of a judgment job

The execution of the dependent unit of a judgment job depends on the execution result of the judgment job. If the dependent unit associated with a judgment job terminates abnormally, whether the dependent unit can be re-executed and how to re-execute it depend on the setting of the RERUNSUBORDINATE environment setting parameter. For details about the parameter, see the appropriate manual section for the platform you are using. If you are using Windows, see 6.2.23 Settings for re-executing the dependent units in the JP1/Automatic Job Management System 3 Configuration Guide. If you are using UNIX, see 15.2.21 Settings for re-executing the dependent units in the JP1/Automatic Job Management System 3 Configuration Guide.

If re-execution of dependent units is disabled (environment setting parameter RERUNSUBORDINATE = no):

Unlike ordinary jobs (such as PC jobs and Unix jobs), dependent units cannot be re-executed. Re-execution from the judgment job that precedes a dependent unit is also not possible.

If a dependent unit terminates abnormally, re-execute the jobnet that contains the dependent unit.

If re-execution of dependent units is enabled (environment setting parameter RERUNSUBORDINATE = yes):

Whether dependent units can be re-executed depends on the unit type and the status of the dependent units.

The dependent unit of a judgment job can be re-executed when all of the following conditions exist:

  • The version of JP1/AJS3 - Manager is 10-00 or later.

  • The judgment job evaluates to true.

  • The judgment job is in Ended normally status.

  • In the following table, Y indicates the unit type of a dependent unit that can be re-executed.

    Table 4‒5: Unit types of dependent units that can be re-executed

    No.

    Unit type

    Unit defined as a dependent unit

    Unit defined in a dependent jobnet

    1

    Job group

    --

    --

    2

    Root jobnet

    --

    --

    3

    Nested jobnet

    Y

    Y

    4

    Root remote jobnet

    --

    --

    5

    Nested remote jobnet

    Y

    Y

    6

    Manager job group

    --

    --

    7

    Manager jobnet

    --

    --

    8

    Planning group

    --

    --

    9

    Standard job

    Y

    Y

    10

    Jobnet connector

    --

    Y

    11

    OR job

    --

    Y

    12

    Judgment job

    --

    N

    13

    Event job

    Y

    Y

    14

    Action job

    Y

    Y

    15

    Custom job

    Y

    Y

    16

    Passing information setting job

    Y

    Y

    17

    HTTP connection job

    Y

    Y

    Legend:

    Y : The unit can be re-executed (if all necessary conditions are satisfied).

    N : The unit cannot be re-executed.

    -- : The unit cannot be defined as a dependent unit.

  • In the following table, Y indicates a dependent unit in the indicated can be re-executed.

    Table 4‒6: Statuses and types of dependent units that can be re-executed

    No.

    Status

    Type of dependent unit

    Jobnet

    Job

    Jobnet connector

    1

    Not sched. to exe.

    N

    N

    N

    2

    Wait for start time

    N

    --

    --

    3

    Wait for prev. to end

    N

    N

    N

    4

    Being held

    N

    N

    --

    5

    Waiting to execute

    --

    N

    --

    6

    Now queuing

    --

    N

    --

    7

    Not executed + Ended

    Y

    Y

    Y

    8

    unexec-W

    Y

    Y

    --

    9

    Bypassed

    Y

    Y

    Y

    10

    Now running

    N

    N

    N

    11

    Running + Abend

    N

    --

    N

    12

    Running + Warning

    N

    --

    N

    13

    Ended normally

    Y

    Y

    Y

    14

    Normal end + False

    --

    --

    --

    15

    Ended with warning

    Y

    Y

    Y

    16

    Ended abnormally

    Y

    Y

    Y

    17

    abnormal-WR

    Y

    Y

    --

    18

    Skipped so not exe.

    N

    --

    --

    19

    Invalid exe. seq.

    Y

    --

    --

    20

    Interrupted

    Y

    --

    --

    21

    Killed

    Y

    Y

    Y

    22

    kill-WR

    Y

    Y

    --

    23

    Failed to start

    --

    Y

    --

    24

    fail-WR

    --

    Y

    --

    25

    Unknown end status

    --

    Y

    Y

    26

    unknown-WR

    --

    Y

    --

    27

    Shutdown

    N

    N

    N

    28

    Wait for start cond.

    --

    --

    --

    29

    Now monitoring

    --

    --

    --

    30

    Unmonitored + Ended

    --

    --

    --

    31

    Monitor terminated

    --

    --

    --

    32

    Interrupted monitoring

    --

    --

    --

    33

    Monitor-end normal

    --

    --

    --

    Legend:

    Y : The unit can be re-executed.

    N : The unit cannot be re-executed.

    -- : The unit cannot have the indicated status.

(5) Notes about rerunning jobnets or jobs

Take note of the following when you rerun a jobnet or job.

(6) Notes on resuming processing while a recovery unit is running

If a job has terminated abnormally, JP1/AJS3 starts a sequence of recovery units. However, if you resume the processing from the job after the abnormally terminated one, the rest of the recovery units will be placed in the Not executed + Ended status and will not be executed. In this case, resume processing after all recovery processes have been performed.

In addition, if you resume units in a way that causes a currently running recovery jobnet to be resumed, such as by specifying a preceding unit that terminated abnormally and resuming that unit with the option After this unit specified, the following might occur:

When the preceding unit is resumed and its status becomes something other than Ended abnormally, the statuses of the units under the recovery jobnet become Not executed + Ended, and execution of the recovery jobnet is interrupted.

To resume the succeeding unit of the preceding unit that terminated abnormally without interrupting the execution of the recovery jobnet, resume units so that the recovery jobnet is not resumed, such as by specifying and resuming the succeeding unit immediately after the preceding unit with the From this unit option specified.

When you rerun the succeeding unit by using the ajsrerun command in a recovery unit, if you specify the -rr, -rn, and -ri options for the command, re-execution can be retried when the unit to be rerun has not ended. For details about the ajsrerun command, see ajsrerun in 3. Commands Used for Normal Operations in the manual JP1/Automatic Job Management System 3 Command Reference.

Note that retry is performed only when the unit specified in the ajsrerun command is not ended as shown in Figure 4-37. In cases shown as Figure 4-38, Figure 4-39, and Figure 4-40, the recovery unit cannot retry re-execution and wait until the other units are ended. For a definition example of rerunning the succeeding unit by using the ajsrerun command in a recovery unit, 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.

If you want to resume the subsequent jobs even when an error is detected, consider whether you can use a judgment job to perform recovery with a dependent unit when the termination code of the judgment job has exceeded a threshold.

(7) Notes on re-executing a jobnet with start conditions

When monitoring of start conditions for a root jobnet is completed and the jobnet status changes from Now monitoring to any of the following statuses, the status of the lower-level units becomes Not executed + Ended.

Because the Not executed + Ended status is treated as an abnormal termination, be careful when you re-execute a generation of a jobnet that has any of the following statuses.