12.1. Scheduler Overview

The main functionality of any enterprise scheduling system is the ability to schedule tasks to execute at a specific date and time. These can be recurring tasks that run at preset intervals or one-time tasks set to execute immediately or at some point in the future.

To achieve this functionality, the Scheduler uses several distinct components to specify scheduled tasks:

Jobs A job instructs the Scheduler to run a specific program at a specific time on a specific date.

Programs A program contains the code (or a reference to the code) that needs to be run to accomplish a task. It can also contain parameters that should be passed to the program at runtime. A program can be stored as an independent object that can be referenced by many jobs.

Schedules A schedule contains a start date, an optional end date, and a repeat interval. With these elements, an execution schedule can be calculated. A schedule can be stored as an independent object that can be referenced by many jobs.

Windows A window identifies a recurring block of time during which a specific resource plan should be enabled to govern resource allocation for the database. For instance, the weekend may be classified as a maintenance window, and you can enable a resource plan that allocates the bulk of the system resources to administrative users.

Job groups A job group is a logical method of classifying jobs with similar characteristics. Job groups define specific characteristics that will be inherited by all jobs assigned to the group. They also simplify management by allowing collections of jobs to be manipulated as one object.

Window groups A window group is a logical method of grouping windows. They simplify the management of windows by allowing the members of the group to be manipulated as one object. Unlike job groups, window groups don't set default characteristics for windows that belong to the group.

These basic components comprise the bulk of Oracle's Scheduler facility. Their design encourages building flexible, reusable components shared by many scheduled jobs.

The Scheduler also offers a powerful and flexible calendaring syntax that is used to specify recurring task executions. This new syntax allows for the specification of complex date and time requirements. It also eliminates many of the shortcomings of DBMS_JOB such as schedule creep (where the start time of a task was directly affected by the start time of the previous execution of that task).

Lastly, the Scheduler allows the execution of non-Oracle-related programs and scripts. This means that the Scheduler can be used not only to execute SQL and PL/SQL, but also operating system executable programs. Therefore, most all of your tasks can be scheduled in a common place.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset