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!

Scheduling anonymous block

jazzaddictOct 20 2011 — edited Oct 21 2011
Is it possible to schedule an anonymous block? if so, how can I do it? some sample code is appreciated.

Edited by: jdude on 20-Oct-2011 04:34

This is an example for stored procedure, I can't figure out how to write one for an anonymous block

begin
dbms_scheduler.create_job
(job_name => 'SCOTT.RUN_SCOTTS_PROC',
job_type => 'STORED_PROCEDURE',
job_action=> 'SCOTT.SCOTTS_PROC',
start_date=> trunc(sysdate+1)+1/24,
repeat_interval=> 'FREQ=DAILY; BYDAY=MON,TUE,WED,THU,FRI,SAT; BYHOUR=1;',
enabled=>true,
auto_drop=>false,
comments=>'Converted from job 152152');
end;

Edited by: jdude on 20-Oct-2011 04:42
This post has been answered by Dom Brooks on Oct 21 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 18 2011
Added on Oct 20 2011
6 comments
4,442 views