Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
By Neil Bryan,
This script will list long running SQL agent jobs and output the results into a HTML formatted email. I have this set up as a SQL Agent job which runs on every Monday morning against our major severs. The results are then emailed to me.
To use script a number of local variables will need to be set-up (ie email server info, search window size, duration time, etc.). Please refer to the comments in the code for further details.
Email consumes a pretty significant chunk for me. Email for my day job, email for my blog, email fro...
Email trigger sends two emails
sending and looping emails
Sending email using Send Email Task