January 9, 2007 at 8:41 am
Hi,
I have a trigger that will send a person an email when an event happen. However, I need the SQL server to wait 5 minitues before sending the email (please don't ask why). Please help.
Thuan
January 9, 2007 at 8:53 am
Create a queue table to hold the details of the email, and have the trigger insert records to this table, along with a timestamp of when the item was queued.
Then create a SQL Agent job that runs periodically to check queue items that have been queued more than 5 minutes and email them.
January 9, 2007 at 9:13 am
And run the job every 2 minutes at least so that at most there is a 6m59s delay before the queuing and execution.
January 9, 2007 at 9:17 am
Thank you very much for the helpful suggestions so far.
Thuan Pham
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy