I would like to know if there is a way to get the next time a job is supposed to be running in SQL Server 2008, using a T-SQL query or even in SSMS if possible, without having to consult all the schedules for all the jobs.
Thank you
|
I would like to know if there is a way to get the next time a job is supposed to be running in SQL Server 2008, using a T-SQL query or even in SSMS if possible, without having to consult all the schedules for all the jobs. Thank you
| |||
|
feedback
|
|
Run sp_help_job in the msdb database. The next_run_date and next_run_time columns have the values you are looking for. | |||
|
feedback
|
|
This'll get you a single row result set with your job name and the next run date/time.
You can of course get rid of the DECLARE and SET and just include it in the join of the inner query. | |||
|
feedback
|