• Take a look at this article (and included script): http://sqlmag.com/t-sql/plugging-gaps-sql-server-job-tracking.

    Probably it will give you allready what you want. I only had to modify it slightly to fit my environment and my specific needs.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **