Skip to main content
Question

Custom events-trigger after 5 mins

  • February 16, 2023
  • 4 replies
  • 208 views

Forum|alt.badge.img+3

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? 

4 replies

Forum|alt.badge.img+23
  • Superhero (Customer)
  • 1169 replies
  • February 16, 2023

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;

Forum|alt.badge.img+3
  • Author
  • Do Gooder
  • 3 replies
  • February 16, 2023

This is not working. Error pops up saying; 

 


Forum|alt.badge.img+23
  • Superhero (Customer)
  • 1169 replies
  • February 16, 2023

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.

 


Forum|alt.badge.img+20
  • Superhero (Employee)
  • 492 replies
  • February 17, 2023

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings