Skip to main content

I have created a Custom Event for Email. I need the system to send the mail after few minutes from trigger point. Is there any possibility to do that? 

Hi @rukshan1114 

yes, it is possible with this chode: dbms_lock.sleep(120);

In my example it will be trigged after 2 minutes.

 

DECLARE
 
BEGIN
DBMS_LOCK.SLEEP (120);
 
END;

This is not working. Error pops up saying; 

 


Hi @rukshan1114 

can you check if you can see SYS.DBMS_LOCK on your database?

Maybe the package DBMS_LOCK is not installed on you database or you haven’t the permissions.

You should be able to see it with IFSAPP.

 


I just want to warn you that if you use dbms_lock.sleep the transaction the event is triggered in is  also waiting the time you specify.

Depending on which transaction you put this in it can lead to problems with locks, so you need to be careful. Also if this is a transaction in the background job queue it might stop the queue from processing more background jobs.


Reply