I have a to make a document on all the SQL Jobs in out DB servers with the trigger times, is there a way of getting all the trigger times from msdb, without going to every job under SQL server agent and checking the properties.
Thanks
I have a to make a document on all the SQL Jobs in out DB servers with the trigger times, is there a way of getting all the trigger times from msdb, without going to every job under SQL server agent and checking the properties.
Thanks
I think you need this:
select
j.job_id,
j.name,
s1.next_run_date,
s1.next_run_time,
s2.*
from msdb.dbo.sysjobs j
left outer join msdb.dbo.sysjobschedules s1
on j.job_id=s1.job_id
left outer join msdb.dbo.sysschedules s2
on s1.schedule_id=s2.schedule_id