
BEGIN 
dbms_scheduler.disable1_calendar_check();
dbms_scheduler.create_schedule('"HOUSEKEEP_RUN_LEVEL_SCHEDULE"','28-JUN-07 01.00.00.000000 AM +08:00',
'FREQ=DAILY; BYHOUR=1',
NULL,
'Run at 1am all days'
);
COMMIT; 
END; 
/ 
 

BEGIN 
dbms_scheduler.create_job('"DAILY_HOUSEKEEPING_SCHEDULE"',
job_type=>'STORED_PROCEDURE', job_action=>
'pk_buildapi.delete_out_of_date_schedule'
, number_of_arguments=>0,
schedule_name=>'"HOUSEKEEP_RUN_LEVEL_SCHEDULE"',
job_class=>'"DEFAULT_JOB_CLASS"', enabled=>FALSE, auto_drop=>FALSE,comments=>
'Clean Table when the scheduled resume datetime is past the current datetime'
);
dbms_scheduler.enable('"DAILY_HOUSEKEEPING_SCHEDULE"');
COMMIT; 
END; 
/ 
 
