Program Overview: This queries the sysjobs, sysjobschedules and sysjobhistory table to produce a resultset showing the jobs on a server plus their schedules (if applicable) and the maximun duration of the job.

The UNION join is to cater for jobs that have been scheduled but not yet run, as this information is stored in the 'active_start...' fields of the sysjobschedules table, whereas if the job has already run the schedule information is stored in the 'next_run...' fields of the sysjobschedules table.

Program Overview: This queries the sysjobs, sysjobschedules and sysjobhistory table to produce a resultset showing the jobs on a server plus their schedules (if applicable) and the maximun duration of the jojob.

The UNION join is to cater for schedules not yet run, as this information is stored in the 'active_start...' fields of the sysjobschedules table, whereas if the job has already run the schedule information is stored in the 'next_run...' fields of the sysjobschedules table.

Note: when a job has multiple schedules it appears multiple itmes in the list

1.2 7 Jul 2016 Jaybrown845 use field Next_run_date instead of Next_run_time to determine lookup to active_start_date field (when using field Next_run_time it does not show next run time for schedules running at 12 AM) changed join to a left join to include jobs witout any schedule Added fileds: schedule id, scheduled enabled, schedule end date and time, job fail notify mail and email combined seperated queries into a single query prepared fo view creation