I used this today to help troubleshoot some production issues.
I cleaned the script up a bit in the following ways:
1. included a "USE MSDB" statement at top because I kept running it in the application DB and kept getting the sysjobs does not exist error
2. Made the date automatically go to Yesterday so I didnt have to type in a new date if I dont want to
3. set a If Exists() statement before the DROP # table statement at the end
4. Set my granularity to 60 seconds so I can see what jobs are running every minute of every day as most jobs complete within a minute or two.
thanks, quite helpful
Gregory A Jackson MBA, CSM