Managing Jobs in the Production Schedule

Overview

In this chapter you learn to use job control, typically performed by an operator, to manage the current production schedule. Job control consists of releasing, stopping, restarting and aborting jobs. You can also rerun jobs, override their dependencies and change their completion status.

This chapter describes how to:

  • Cancel a job
  • Remove a job
  • Release a job group in the Waiting on Operator status
  • Place a job on Hold
  • Override a job dependency
  • Rerun a job that fails

Note To complete the exercises in this tutorial, you need to:

  • Install Enteprise Scheduler in the default directory Scheduler (or the examples in this tutorial will not work properly)
  • Select the Super User option in your User definition
  • Configure a default agent
  • Create and have available the work day calendar


 

Creating the Parent Job Group

To create the parent job group:

1. From the Navigator pane, select Definitions>Jobs to display the Jobs pane.

2. Right-click in the Jobs pane and select Add Job Group from the context menu to display the Job Group Definition dialog.

3. Right-click in the Jobs pane and select Add Job Group from the context menu to display the Job Group Definition dialog.

 

4. In the Job Group Name field, enter Production Jobs . The Parent Group field should be empty.

5. In the Calendar Name list, select work day .

6. Click OK .

7. Click OK in the Effective Date dialog

Creating Three Child Jobs

To create three child jobs:

1. To create a child job of a job group, select the Production Jobs job group on the Jobs pane.

2. Click the Add Job button or right-click and select Add Job from the context menu to display a Job Definition dialog.

3. In the Job Name field, enter Prod Job 1 .

4. In the Command field, enter the full path to the Ap31 batch file.

5. Click the Options tab.

6. Select the Require operator release option.

7. Click OK and then click OK again in the Effective Date dialog.

The first job has been created.

8. In the Jobs pane, select the Prod Job 1 job if not selected.

9. Right-click Prod Job 1 and select Copy Job/Group from the context menu.

10. A job called Copy of Prod Job 1 appears in the Jobs pane.

11. While the Copy of Prod Job 1 job is selected, click the Edit Job\Group button or right-click and select Edit Job\Group from the context menu.

12. In the Job Name field, change the name to Prod Job 2 .

13. Click OK and then click OK again in the Effective Date dialog.

The second job has been created.

14. Create a third job, called Prod Job 3 , the same way we created Prod Job 2 .

For this job, we will add an unreasonable time dependency to show how we can override this dependency in the Job Activity window.

15. Double-click Prod Job 3 .

16. Click the Schedule tab of the Prod Job 3 definition.

 

17. Clear the Inherited option in the Time Window section.

18. Enter a Time Window of 11:45 PM to 12:00 AM .


Note If you set a time window that is before the present time, e.g., 12:00 AM to 12:15AM, the job will enter today’s schedule with a Timed Out status.


19. Click the Options tab.

20. Make sure the Require operator release option is cleared. This job will wait based on its time window. (We are assuming that you are not running this tutorial at midnight.)

21. Click OK , then click OK again in the Effective Date dialog.

22. Right-click the new job group that you defined, then select Insert Job into Schedule and click OK .

23. Click OK in the Information dialog.

Viewing the Jobs in the Job Activity Pane

From the Navigator pane, select Operations>Job Activity to display the Job Activity pane.

You see all three jobs in the job group as in the following figure.

Job Sorting

Jobs can be sorted and filtered by most columns in the Job Activity pane. On every refresh, sorting occurs on the column which contains a caret (^) in the column header. In this exercise, we will set the default sort column to be the Estimated Start Time .

Click the Est Start Time column header. The jobs are sorted by the estimated start time.

Removing a Job from the Production Schedule

If a job has not launched, you can remove it from the production schedule.

To remove a job from the production schedule:

1. On the Job Activity pane, right-click the Prod Job 1 job.

2. Select Remove Jobs(s) from Schedule from the context menu.

3. When the Confirm dialog is displayed click Yes .


Note You can also remove a job by clearing the Enabled option in the job definition, or by deleting the job from the Jobs pane. You can only remove a job from the production schedule if it is not currently running or has not yet run.


Inserting a Job Into the Production Schedule

To insert a job into the production schedule:

1. From the Activities main menu, select Insert Job into Schedule to display the Insert Job Into Schedule dialog.

 

There are several ways to enter a job in this dialog. For this exercise, we will use Enteprise Scheduler’s sophisticated search function.

2. Click the ellipses button in the Job/Group field to display the Job Search dialog.

 

3. In the Name field, type Prod* . Leave the other text fields blank.

The asterisk ( * ) is a wildcard character, so this search will find all jobs that start with Prod . (The asterisk matches any character or combination of characters.)

4. Click the Find button .

The Job Search Results section should include the three Prod Jobs and the Production Jobs job group.

5. Select Prod Job 1 .

6. Click OK in the Job Search dialog.

7. Click OK in the Insert Job Into Schedule dialog.

8. Click OK at the Information dialog.

The job is added to the schedule outside its job group. Note that jobs outside of a job group are not indented under the group.

9. Right-click the Prod Job 1 (1) job and from the Job Control menu select Release/Resume .

10. Click Yes in the Confirmation dialog.

11. Click OK in the Information dialog.

The job begins to run.

Canceling a Job in the Production Schedule

You can cancel a job using the Cancel/Abort command when it is in the Held state.You can abort a job using the Cancel/Abort command when it is in the Active state. In the next procedure, we will cancel a job that is in the Held state.

To cancel a job in the production schedule:

1. From the Navigator pane, select Operations>Job Activity to display the Job Activity pane.

2. Select the Prod Job 2 job.

3. Right-click the Prod Job 2 and from the Job Control menu select Cancel/Abort .

4. Click Yes at the Confirmation dialog .

5. Click OK in the Information dialog.

The status of the job changes to Canceled .

Placing a Job on Hold

You can put any job that is waiting on dependencies on hold. Even if the dependencies are met, the job will not run while in the Hold state.

To place a job on hold:

1. Select the Prod Job 3 job.

2. Right-click the Prod Job 3 job and from Job Control submenu select Hold/Stop .

3. Click Yes in the Confirmation dialog.

4. Click OK in the Information dialog.

The job enters Held status.

Removing the Job Out of Held Status

To remove a job from Held status:

1. Right-click the Prod Job 3 job and from the Job Control submenu select Release/Resume .

2. Click Yes in the Confirmation dialog, and then click OK at the Information dialog.

The job re-enters the Waiting On Dependencies status. If the job’s dependencies were met, the job would launch.

Overriding a Dependency

You can also override job, file, time and variable dependencies with the Override command. For this exercise, we will override the time dependency.

To override a dependency:

1. Right-click the on Prod Job 3 job and from the Job Control submenu select Override .

2. Click Yes in the Confirmation dialog, and then click OK at the Information dialog. The job launches even though the dependencies have not been met.


Note When a dependency is overridden, the Job Detail dialog for the job whose definition includes the dependency will show which dependency was overridden.


Estimated and Excessive Durations

Two of the most common questions asked of system operators and schedulers are “How long is this job going to run?” and “Which job is going to run next?” To help answer these questions, Enteprise Scheduler provides the Estimated Duration feature.

When a job enters the production schedule for the first time, if an estimated duration time is specified in the Job Definition dialog, that time will be displayed in the Job Activity pane. The Estimated Duration Time value is automatically updated after each job occurrence runs, creating a historical average that is used for subsequent submissions. Of course, you can override this value in the job definition at any time.

For unattended operations, you may want a job:

  • to terminate if it runs over its maximum time
  • to notify an operator if it completes under its minimum time
  • to perform other actions automatically