Re: How to be notified when a job has finished

From: news.verizon.net <kennedyii_at_verizon.net>
Date: Wed, 27 Feb 2008 12:52:29 GMT
Message-ID: <h2dxj.31636$6h7.11708@trnddc04>

<anisbenh_at_gmail.com> wrote in message
news:dd7aa973-4322-455b-938a-ba922057b4d6_at_d21g2000prf.googlegroups.com...
> Hi,
>
> I have triggers that submit jobs to the user_jobs via this command:
>
> dbms_job.submit( jobno, 'dbms_mview.refresh(''MY_MV'', ''C'');' );
>
> Is there a possibility to beeing informed when the job finishes ?
> (An alternate and not elegant solution would be to poll every minute
> the user_jobs queue and check if the
> jobno is still there)
>
> Can anyone help ?
>
> Thanx,
> Anis

How would you want the notification? You could wrap the procedure and call that and have that procedure do someting when the procedure fiunishes.

create or replace procedure mywrapped(arg1 in varchar2, arg2 in varchar2) as begin

    dbms_mview.refresh(arg1 , arg2);
    insert into sometble values('job is done');     commit;
end;
/ Received on Wed Feb 27 2008 - 06:52:29 CST

Original text of this message