The Scheduler enables database administrators and application
developers to control when and where various tasks take place. These tasks can
be time consuming and complicated, so using the Scheduler can help you to improve
the management and planning of these tasks. In addition, by ensuring that many
routine database tasks occur without manual intervention, you can lower operating
costs, implement more reliable routines, and minimize human error.
The Scheduler uses three main components:
A schedule specifies when and how
many times a job is executed. Similar to programs, schedules are database
entities and can be saved in the database. The same schedule can be used
by multiple jobs.
A program is a collection of metadata
about what will be run by the scheduler. This includes information such
as the program name, the type of program, and information about arguments
passed to the program.
A job specifies what needs to executed
and when. For example, the "what" could be a PL/SQL procedure,
an executable C program, a java application, a shell script, or client-side
PL/SQL. You can specify the program (what) and schedule (when) as part of
the job definition, or you can use an existing program or schedule instead.
A window is represented by an interval of time with a well-defined
beginning and end and is used to activate different resource plans at different
times. Perform the following:
1.
Click Windows.
2.
Click Create.
3.
Enter the name COMPUTE_WINDOW001 and click Create
Resource Plan.
4.
Enter the Plan COMPUTE_PLAN001 and click Modify.
5.
Select LOW_GROUP and click Move. Then
click OK.
6.
Enter 90 for the LOW_GROUP Level 1 plan and 10
for the OTHER_GROUPS Level 1 plan. Then click OK.
7.
Enter the following information and click OK.
Resource Plan: COMPUTE_PLAN001 Priority: High
Description: For the duration of this window the COMPUTE_PLAN001 will
be active
Schedule: Use a Calendar
Repeat: By Days
Interval: 7
Time: 11:00PM Start: Later
Date:Today's date
Time:6:00PM
Duration: 4 hours
End Date: One year from today's date
8 .
Now you are ready to create a job that uses the window
and job class you just created. Click your Database breadcrumb.
Creating Jobs that Belong to Different
Job Classes