create table temp_test_schedule
(
createdate date,
num number
);
begin
dbms_scheduler.create_schedule(schedule_name => 'TEST_SCHEDULE',
start_date =>sysdate ,
repeat_interval => 'FREQ=MINUTELY;INTERVAL=1',
end_date => null,
comments => null);
/*dbms_scheduler.drop_schedule( 'TEST_SCHEDULE');*/
end;
/
select * from user_scheduler_schedules;
begin
dbms_scheduler.create_program(program_name => 'PRO_TEST_SCHEDULE',
program_type => 'STORED_PROCEDURE',
program_action => 'PROC_TEST_SCHEDULE',
number_of_arguments => 0,
enabled => true,
comments => null);
end;
/
select * from user_scheduler_programs;
begin
dbms_scheduler.create_job( job_name=> 'JOB_TEST_SCHEDULE',
program_name => 'PRO_TEST_SCHEDULE',
schedule_name =>'TEST_SCHEDULE',
enabled => true
);
/* dbms_scheduler.enable('JOB_TEST_SCHEDULE');*/
/* dbms_scheduler.run_job('JOB_TEST_SCHEDULE');*/
/* dbms_scheduler.drop_job(job_name => 'JOB_TEST_SCHEDULE');*/
end;
/
select * from user_scheduler_jobs;
select * from user_scheduler_job_run_details;