rerun

You can use the rerun command to rerun a job.

Overview

You can run the command when a job is in the SUCC or FAIL, or ABEND state. When you submit the command, the job rerun of the job is placed in the same job stream as the original job, and all the associated dependencies of the original job are added. If you rerun a job that is scheduled to run multiple times, the rerun is also scheduled to start at the same rate. The rerun jobs are displayed with the notation >>rerun as.
Note: When you rerun a job that contains variables that use docommand or with script parameters, the job is started and completed, but the variables are not resolved with their values.

Syntax and command line options

Before you run the command, you must specify the details of the command line options such as job name and rerun options. You can enter the command as follows:
ocli plan rerun | rr jobselect [from=[[folder/]wkstat#] job ;[at=time]]|[streamlogon|logon=new_logon];[docommand="new_command"|script="new_script"] ;step=step ;[noask]
You must provide a job name, which is a mandatory parameter to run the command. All the other parameters are optional. The details required with each parameters are as follows:
jobselect
Specify the job which you want to rerun, by means of attributes and qualifiers.
from=[[folder/]wkstat#]job
Instead of running the job specified in jobselect, you can specify the definition of the job that you want to run. You can also run the jobs that are in SUPPR state, if they are from job streams that are not in suppressed or cancelled state.
  • wkstat#
    You can specify the name of the workstation to run the job on by defining the workstation in thefrom parameter.
  • job
    You can specify the name of a job to run that includes a definition you want to be a part of the job stream.
    Restriction: The following types are not permitted:
    • Jobs submitted by using the submit docommand command.
    • The alias names of jobs submitted by using the submit job command.

    The option is mutually exclusive with streamlogon|logon and docommand|script options.

at = time
You can specify the start time for the rerun as follows.
time = hhmm [timezone|tz tzname] [+n days | date]
hhmm: Specify the hour and minute.

+n days: Specify the number of days until the next rerun.

date: Specify the date of the next occurrence rerun in the following formatmm/dd/yy.

timezone|tz name: Specify the timezone. For time zones, see timezone.

step=step

You can rename the job specified in the data definition. In Orchestration CLI, jobs that rerun with the step=step option are displayed with the >>rerun step notation.

streamlogon|logon=new_logon

You can use the option to run the job under a new user name. The option is mutually exclusive with from parameter. The option is only applicable for completed jobs.

docommand="new_command"
You can specify a new command to rerun the jobs instead of using the original command. The option is applicable only for completed jobs. The option is mutually exclusive with script and from.
script="new_script"
You can specify new script to rerun the jobs instead of original script. The option is only applicable for completed jobs. The option is mutually exclusive with docommand and from.
noask

When you add the noask option as an argument, the agent does not ask for confirmation before it acts on each qualifying item.

Examples

  1. To rerun the job4 job in the sked1 job stream on the main workstation, run the following command:
    ocli plan rr main#sked1.job4
  2. To rerun the job5 job in the sked2 job stream using the job definition for the jobx job where the job's at time is set to 6:30 PM, run the following command:
    ocli plan rr sked2.job5;from=jobx;at=1830
  3. To rerun the job3 job in the sked4 job stream using the jstep2 job name, run the following command:
    ocli plan rr sked4.job3;step=jstep2