Home > oracle > Oracle DBMS_SCHEDULER: every 30 minutes in working hours

Oracle DBMS_SCHEDULER: every 30 minutes in working hours

I want to create an schedule to execute a job every 30 minutes during working hours.

Here (http://awads.net/wp/2011/02/02/25-unique-ways-to-schedule-a-job-using-the-oracle-scheduler/) you can find good examples. Combining some of them, I created this schedule to execute a procedure every 30 minutes from 7.00 AM to 20.30PM:


begin
dbms_scheduler.create_job(
job_name=> 'JOB_DAILY',
job_type=> 'PLSQL_BLOCK',
job_action=> 'begin my_procedure; end;',
start_date => to_timestamp('20/08/2012 12:00:00', 'dd/mm/yyyy hh24:mi:ss'),
repeat_interval => 'FREQ=DAILY; BYDAY=MON,TUE,WED,THU,FRI;BYHOUR=7,8,9,10,11,12,13,14,15,16,17,18,19,20; BYMINUTE=0,30;',
enabled => true,
auto_drop=> false
);
end;
/

Advertisements
Categories: oracle Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: