- create schedule
-- Creating a common schedule which could be used to schedule a JOB to run Daily at 1:00 AM
-- US/Eastern Time.
DBMS_SCHEDULER.create_schedule(
schedule_name => 'DLY0100_COMMON_SCHED' ,
start_date => trunc(SYSDATE+1) at TIME ZONE 'US/Eastern',
repeat_interval => 'freq=daily; byhour=1;' ,
comments => 'Runtime - Everyday (Mon-Sun) at 01:00 AM US/Eastern Time'
);
--
-- Create a job with an inline program and a defined schedule to
-- do daily purge for g tables.
--
DBMS_SCHEDULER.create_job(
job_name => 'DLY0100_DAILY_PURGE_GRP1' ,
schedule_name => 'DLY0100_COMMON_SCHED' ,
job_type => 'PLSQL_BLOCK' ,
job_action => 'BEGIN daily_purge(null,1); END;' ,
enabled => TRUE ,
auto_drop => FALSE ,
comments => 'Daily job to purge group 1 tables.'
);
-- Creating a common schedule which could be used to schedule a JOB to run Weekly at 3:00 AM
-- US/Central Time.
--
DBMS_SCHEDULER.create_schedule(
schedule_name => 'WKLY0300_COMMON_SCHED' ,
start_date => trunc(SYSDATE+1) at TIME ZONE 'US/Eastern',
repeat_interval => 'freq=weekly; byday=sun; byhour=2;' ,
comments => 'Runtime - Every Sun at 3:00AM '
);
-- Create a job with proecdure
DBMS_SCHEDULER.create_job(
job_name => 'WKLY0300_SP_COLLECT_MIS_STATS' ,
schedule_name => 'WKLY0300_COMMON_SCHED' ,
job_type => 'STORED_PROCEDURE' ,
job_action => 'sp_collect_mis_stats',
enabled => TRUE ,
auto_drop => FALSE ,
comments => 'Weekly job to collect mis stats'
);
-- Creating a common schedule which could be used to schedule a JOB to run Daily at 1:00 AM
-- US/Eastern Time.
DBMS_SCHEDULER.create_schedule(
schedule_name => 'DLY0100_COMMON_SCHED' ,
start_date => trunc(SYSDATE+1) at TIME ZONE 'US/Eastern',
repeat_interval => 'freq=daily; byhour=1;' ,
comments => 'Runtime - Everyday (Mon-Sun) at 01:00 AM US/Eastern Time'
);
--
-- Create a job with an inline program and a defined schedule to
-- do daily purge for g tables.
--
DBMS_SCHEDULER.create_job(
job_name => 'DLY0100_DAILY_PURGE_GRP1' ,
schedule_name => 'DLY0100_COMMON_SCHED' ,
job_type => 'PLSQL_BLOCK' ,
job_action => 'BEGIN daily_purge(null,1); END;' ,
enabled => TRUE ,
auto_drop => FALSE ,
comments => 'Daily job to purge group 1 tables.'
);
-- Creating a common schedule which could be used to schedule a JOB to run Weekly at 3:00 AM
-- US/Central Time.
--
DBMS_SCHEDULER.create_schedule(
schedule_name => 'WKLY0300_COMMON_SCHED' ,
start_date => trunc(SYSDATE+1) at TIME ZONE 'US/Eastern',
repeat_interval => 'freq=weekly; byday=sun; byhour=2;' ,
comments => 'Runtime - Every Sun at 3:00AM '
);
-- Create a job with proecdure
DBMS_SCHEDULER.create_job(
job_name => 'WKLY0300_SP_COLLECT_MIS_STATS' ,
schedule_name => 'WKLY0300_COMMON_SCHED' ,
job_type => 'STORED_PROCEDURE' ,
job_action => 'sp_collect_mis_stats',
enabled => TRUE ,
auto_drop => FALSE ,
comments => 'Weekly job to collect mis stats'
);