Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Schedule a job to run continuosly

user5716448Dec 10 2020 — edited Dec 10 2020

Hi,
version 11.2.0.3
Have used dbms_scheduler to run jobs at specific intervals.

However, would like a job to run 24*7

The pl/sql package itself checks for data in table and sleeps every 5 mins and will only exit loop when we set a row in a control table to N, we then plant to set to Y when we then need it to start again - plan is to onlly set this to N when need do some maintenance e.g. chnage package.
How can we best set up job to run dbms_scheduler to run continously?

Tried below but not seeing it in all_scheduler_jobs

-- Test statements here
BEGIN
DBMS_SCHEDULER.create_job (
job_name => 'example_jobB',
job_type => 'PLSQL_BLOCK',
job_action => 'BEGIN example_pkg.procedure; END;',
start_date => SYSTIMESTAMP,
-- end_date => NULL,
-- repeat_interval => NULL,
enabled => TRUE);
END;

Looks like below would work and better way of doing this and can then just disable the scheduled job whenever need maintain package.

repeat_interval => 'FREQ=MINUTELY;INTERVAL=5;',

Thanks

This post has been answered by GregV on Dec 10 2020
Jump to Answer
Comments
Post Details
Added on Dec 10 2020
1 comment
1,261 views