www.oradev.com
  Database   Sql   Functions   Packages   Performance   Books   Oracle   Other   About   XML   ORA-messages
  Job scheduling in Oracle database

Database/Sql

Pl/sql tools
create table
Database scheduler
create tablespace
dba metrics
Table with sequenced numbers
Autonomous transaction
ORA-12537 error
Parse a String in pl/sql
Export with oracle datapump


  OraDev.com

Database scheduler in Oracle 10/ oracle 11 with dbms_scheduler

Oracle has 2 different packages for job scheduling. The old package is called DBMS_JOB.
Since Oracle 10g the DBMS_JOB package is replaced by the DBMS_SCHEDULER package. The DBMS_JOB package is now depricated and in Oracle 10g it's only provided for backward compatibility. From Oracle 10g the DBMS_JOB package should not be used any more, because is could not exist in a future version of Oracle.

A full description of dbms_scheduler can be found here.
A sample on how to call dbms_job:
declare
  l_job user_jobs.job%TYPE;
begin
  /* run procedure runjob every hour */
  dbms_job.submit(l_job, 'begin runjob; end;', sysdate,'sysdate+1/24');
  commit;
end;