A query retorna as seguintes colunas:
- JobID: Guid que identifica o Job
- Name: Nome do Job
- StartDate: Data/hora em que o Job vai executar
1 2 3 4 5 6 7 8 9 10 | SELECT sysjobs.job_id AS JobId ,sysjobs.name AS Name ,MAX(sysjobactivity.next_scheduled_run_date) AS StartDate FROM msdb.dbo.sysjobs INNER JOIN msdb.dbo.sysjobactivity ON (sysjobactivity.job_id = sysjobs.job_id) WHERE sysjobactivity.next_scheduled_run_date > GETDATE() GROUP BY sysjobs.job_id ,sysjobs.name |
No comments:
Post a Comment