rerun

You can use the rerun command to rerun a job.

Overview

You can run the command when a job is in SUCC or FAIL or ABEND state. When you submit the command, the 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 scheduled to launch at the same rate as original job.
Note: When you rerun a job that contains variables using docommand or with script arguments, the job is launched and completed, but the variables are not resolved with their value.
Restriction: When the command is submitted, the agent will not ask for your confirmation before taking action on each jobs.

Syntax and command line options

Before you run the command, you must specify options such as job name and required permissions. you can create the command as described below.
<rerun | rr> jobselect<[;from=[[folder/]wkstat#]job[at=time]|[streamlogon|logon=new_logon]]<docommand="new_command"|script="new_script">
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 to update, by means of attributes and qualifiers.

from=[[folder/]wkstat#]job
You can specify the job name which you want to run instead of job specified in jobselect. You can also run the jobs 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 on which you want to run the job.

  • job
    You can specify the name of the job that you want to run.
    Restriction: The following types are not permitted:
    • The jobs submitted using the submit docommand.
    • The alias names of jobs submitted using the submit job command.
The table below describes the recovery options of the initial job and the job mentioned in from option.
Table 1.
recovery option from intial job Retrieved from "from" job
stop No Yes
at=time

You can specify the start time for the rerun as follows:

hhmm [timezone|tz tzname] [+n days | date]
hhmm: Specify the hour and minute.

+n days: Specify the next occurrence of rerun in number of days.

date: Specify the date for the next occurrence of rerun in mm/dd/yy.

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

streamlogo|logon=new_logon

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

docommand="new_command"

You can specify new command to rerun the jobs instead of original command. The option is only applicable 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 option as an argument the agent will not ask for confirmation before taking action on each qualifying job.

Examples

  1. To rerun job job4 in job stream sked1 on workstation main, run the following command:
    rr main#sked1.job4
  2. To rerun job job5 in job stream sked2 using the job definition for job jobx where the job's at time is set to 6:30 p.m. , run the following command:
    rr sked2.job5;from=jobx;at=1830;