dbms_job [message #1038] |
Sat, 23 March 2002 09:06 |
ksenji
Messages: 1 Registered: March 2002
|
Junior Member |
|
|
create or replace procedure every15min as
x number;
begin
dbms_job.submit(x,'Mail();',sysdate,'sysdate+15/1440');
end;
.
above is a procedure, which i used for sending mail every 15 min, as a
reminder of an event, which in turn uses a java stored procedure,
Mail(); to send the mail, but when i call every15min thro' a trigger,
the job is just added to the user_jobs but the mail is not sent, but
when i execute
exec dbms_job.run(29); //suppose the job number is 29, then the mail
is being sent but the mail is not being sent the next time ie, after
the 15 min, why is this so?
but when i execute
select last_date,next_date from user_jobs where job = 29, i get
the times when the job got executed and the time when it is going to
be executed ie, after 15 minutes, but, after that time, it is not
being executed, what am i doing wrong, please help --??
Thank you for your time ....
</ksenji>
|
|
|
Re: dbms_job [message #1061 is a reply to message #1038] |
Tue, 26 March 2002 09:42 |
oraboy
Messages: 97 Registered: October 2001
|
Member |
|
|
if you want this to make it automated..then just create a job using 'dbms_job' and specify its time interval.
( u dont have to call it everytime thru a trigger)
I m sure once you create a dbms_job oracle itself handles execution of same job in the specified time interval..
you can create a procedure mail() which sends email
create a job which calls this procedure mail() for every minutes
Let me know if you have more questions
|
|
|