• For the script that is looking for jobs still running I think an easyer script will be

    msdb.dbo.sp_get_composite_job_info @execution_status = 1

    since the rest of parameters has a default NULL.

    Ionel