Databases Reference
In-Depth Information
In this example a new schedule is created, it is defined to run hourly at an interval of
six hours. This schedule is defined to start at invocation time and runs indefinitely.
BEGIN
DBMS_SCHEDULER.CREATE_SCHEDULE(
schedule_name => 'demo_schedule',
start_date => SYSTIMESTAMP,
end_date => null,
repeat_interval => 'FREQ=HOURLY;INTERVAL=6',
comments => 'Hourly schedule at an interval of six hours');
END;
Jobs and Job Classes
The Job is the programmed execution of a task at a given time and during a given
period of time. Once the schedule and the program objects have been defined, they
can be used in a job definition making it simpler and more readable.
BEGIN
sys.dbms_scheduler.create_job(
job_name => '"OSCHEDULER"."OS_LOG_RECORDS_JOB"',
program_name => 'OSCHEDULER.OS_LOG_RECORD_PROG',
schedule_name => 'OSCHEDULER.MINUTELY_SCHEDULE',
job_class => 'DEFAULT_JOB_CLASS',
auto_drop => FALSE,
enabled => TRUE);
END;
A Job Class is a way of grouping jobs and linking them to a resource consumer
group, so that you can define common properties among different jobs in a single
operation. This enables the same behavior and same properties among homogeneous
jobs. You can specify attributes at the class level; you can also define the order in
which a job is started. Linking to resource manager is important as this is a way you
can emphasize the resources allocated to all the jobs that run under a given
Job Class.
 
Search WWH ::




Custom Search