Although the scheduler is capable of very complicated schedules, on many occasions you just want to create a simple job with everything defined inline. If that's all you want, the following example is for you. BEGIN DBMS_SCHEDULER.create_job ( job_name => 'test_full_job_definition', job_type => 'PLSQL_BLOCK', job_action => 'BEGIN my_job_procedure; END;', start_date => SYSTIMESTAMP, repeat_interval => 'freq=hourly; byminute=0; bysecond=0;', enabled => TRUE); END; / Programs The scheduler allows you to optionally create programs which hold metadata about a task, but no schedule information. A program may related to a PL/SQL block, a stored procedure or an OS executable file. Programs are created using the CREATE_PROGRAM procedure. Create the test programs. BEGIN -- PL/SQL Block. DBMS_SCHEDULER.create_program ( program_name =
Comments
Post a Comment