Defining Repeating Jobs in Unicenter CA-Scheduler Job Management r9.1

Document ID : KB000055767
Last Modified Date : 14/02/2018
Show Technical Document Details

Many sites have a need for a given job or job stream to execute over and over in a single day. Examples include batch processing of requests that have been entered, or monitoring for a certain condition, such as a file arriving from another system.
Traditionally, such repeating jobs have been handled by defining the job many times (96 times for a job that runs every 15 minutes!). Care had to be taken to prevent each job from starting before the previous iteration completed, and all of the jobs would appear in the active workload at autoscan, making the operator's job harder.

Unicenter CA-Scheduler r9.1 simplifies this process by allowing you to define jobs and schedules as repeating work. Here's how to define a repeating job:

Begin by defining the schedule and job normally. While editing the job, either scroll down to the repeat screen (it's the last screen in the job definition), or issue the REPEAT jump command on the command line:

The repeat screen is displayed:

To make this a repeating job, set the "Repeat" field to Yes.

Unicenter CA-Scheduler needs to know how long to wait before running the job again. Enter a time, in HHMM format, in the "Interval" field.

Unicenter CA-Scheduler also needs to know if the interval is to be added to the previous run's start or end time. For example, if you specify a 15 minute interval for a job that started at 9:00AM and ended at 9:04AM, should the next iteration start at 9:15AM or 9:19AM? Enter START or END in the "From" field.

For example, to define a repeating job with a 15 minute interval between job starts, you would enter:

The last piece of information that Unicenter CA-Scheduler needs for a repeating job is when to stop repeating it. You may specify a total number of repetitions, or a time at which Unicenter CA-Scheduler should stop repeating the job, or both. (The end time is specified in Unicenter CA-Scheduler's normal DDHHMM format.)

For example, this job should be repeated up to 25 times, but should not be repeated after 5:00PM:

Understanding how repeating jobs work is easiest by going through an example. Suppose the job we just defined is brought in by autoscan at 8:00AM. Assuming the job does not have an early start time or any predecessors, the job is immediately submitted.

Suppose that the job starts promptly at 8:00AM and ends successfully at 8:07AM. Unicenter CA-Scheduler will issue an internal "RUN JOB" command to bring in another copy of the job. The new job will have an early start time of 8:15AM (the previous job's start time plus 15 minutes). The new job will also have a repeat count of 24, since it has already been repeated once.

You can see the current repeat values by displaying the job's status detail screens and scrolling to the repeat screen:

Notice that the repeat count is now 24, and that the end time has been resolved to a real date and time.

Suppose that the second occurrence of the job is submitted on time at 8:15AM, but doesn't actually start until 8:16AM due to a lack of initiators. When the job successfully completes Unicenter CA-Scheduler will issue an internal "RUN JOB" to bring in the next copy of the job. This 3rd copy will have an early start time of 8:31AM-not 8:30AM. Remember that the repeat interval is added to the previous iteration's actual start or end time, not the submission time. The repeat count is now 23.

Finally, consider the third occurrence of the job, which is submitted at 8:31AM and promptly abends. The problem is not corrected until 9:10AM, at which time the RERUN command is issued to re-submit the job. This copy of the job successfully completes at 9:17AM. Unicenter CA-Scheduler issues the internal "RUN JOB" command, setting an early start time of 9:25AM-15 minutes after the last start of the job. Unicenter CA?Scheduler does not run the "missed" iterations that would normally have executed around 8:45AM, 9:00AM, or 9:15AM.

Here are some important tips to remember about repeating jobs and schedules:

  • If you have a single job to be executed over and over, use the repeat at the job level. If you have two or more jobs that should run in order repeatedly, define the jobs to a schedule and use the repeat screen in the schedule definition. The repeat definition for schedules is the same as for jobs.
  • Jobs and schedules are repeated only when successfully complete.
  • "Missed" repetitions, such as in the example above, are not made up.
  • Jobs and schedules are not repeated if they are backlogged. Instead, the current execution is allowed to complete, then the work for the new day is brought into the active workload and executed.
  • If both a repeat count and a repeat end time are specified, Unicenter CA-Scheduler will stop repeating the job when the count is zero or the time is reached, whichever occurs first.
  • Unicenter CA-Scheduler repeats work by issuing an internal "RUN" command. This means that any changes made to the job or schedule definitions will be picked up on the next repetition.
  • The repeat count indicates the number of times the work is to be repeated-not the total number of times it will execute. For example, if the repeat count is 5, then the work will be repeated five times, for a total of six executions.

Using repeating jobs and schedules is an easy way to schedule work to run many times in the same day while reducing the complexity of your daily workload.