rerun

You can use the rerun command to rerun a task.

Overview

You can run the command when a task is in the SUCC or FAIL, or ABEND state. When you submit the command, the task rerun of the task is placed in the same workflows as the original task, and all the associated dependencies of the original task are added. If you rerun a task that is scheduled to run multiple times, the rerun is also scheduled to start at the same rate. The rerun tasks are displayed with the notation >>rerun as.
Note: When you rerun a task that contains variables that use docommand or with script parameters, the task 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 task 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 task 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 task which you want to rerun, by means of attributes and qualifiers.
from=[[folder/]wkstat#]job
Instead of running the task specified in jobselect, you can specify the definition of the task that you want to run. You can also run the tasks that are in SUPPR state, if they are from workflows that are not in suppressed or cancelled state.
  • wkstat#
    You can specify the name of the workstation to run the task on by defining the workstation in thefrom parameter.
  • job
    You can specify the name of a task to run that includes a definition you want to be a part of the workflow.
    Restriction: The following types are not permitted:
    • Tasks submitted by using the submit docommand command.
    • The alias names of tasks 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 task specified in the data definition. In Orchestration CLI, tasks 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 task under a new user name. The option is mutually exclusive with from parameter. The option is only applicable for completed tasks.

docommand="new_command"
You can specify a new command to rerun the tasks instead of using the original command. The option is applicable only for completed tasks. The option is mutually exclusive with script and from.
script="new_script"
You can specify new script to rerun the tasks instead of original script. The option is only applicable for completed tasks. 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 task4 task in the sked1 workflow on the main workstation, run the following command:
    ocli plan rr main#sked1.task4
  2. To rerun the task5 task in the sked2 workflow using the task definition for the taskx task where the workflow's at time is set to 6:30 PM, run the following command:
    ocli plan rr sked2.task5;from=taskx;at=1830
  3. To rerun the task3 task in the sked4 workflow using the jstep2 task name, run the following command:
    ocli plan rr sked4.task3;step=jstep2