Databases Reference
In-Depth Information
This schedule task is composed of a simple database stored unit that updates
a table at a specified time. First you must create the procedure, and then schedule it.
At this stage this schedule doesn't include the program or the schedule concept to
create the job, those are explicitly defined in one step. In a later example these will be
created separately.
The parameters used in this example are explained next.
Creating the job
The jobs are created using the CREATE_JOB procedure. The following parameters
are used in the example and are as shown in the screenshot:
JOB _ NAME : Jobs are database objects and require a unique name that follows
the standard Oracle object naming convention.
JOB_TYPE : There are several different kinds of jobs—programs (external OS
commands or shell scripts), PL/SQL Blocks, Stored Procedures, executable
programs, or chains.
JOB_ACTION : This refers to the procedure name to be executed.
REPEAT_INTERVAL : DBMS_SCHEDULER utilizes time expressions with a particularly
simple syntax to define the job frequency. In the example, the job was specified to
run every two minutes (FREQ=MINUTELY; INTERVAL=2) .
START_DATE : The start date is defined with a timestamp using time zone data
type. In the example, it is defined using the to_timestamp_tz function.
END_DATE : If this parameter is defined, it means the job will finish being scheduled
at this point in time; otherwise it means the job will keep on running indefinitely.
JOB_CLASS : This parameter specifies the job class to which the job will be related.
All jobs must belong to a job class. As it is not defined in this case, the job will belong
to the DEFAULT_JOB_CLASS .
COMMENTS : This is a varchar2 column which is intended for the job creator to
document what the job does.
AUTO_DROP : The job creator can specify whether or not the task will be
automatically dropped after it is completed.
 
Search WWH ::




Custom Search