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 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply