SQL Query Upcoming Agent Job Schedule

Last week, my team needed to install a couple patches to our server environment, which required a full reboot of the server.  This led to the obvious question of when to run the updates and reboot.  I wanted to make sure no SQL jobs were impacted, so I needed a quick listing of the SQL Agent job schedule.  The following post provides a very simple query to accomplish this task.

SQL Query Upcoming Agent Job Schedule

The query to accomplish this task is quite simple.  You run the query against the MSDB database, hitting the following tables:

  • sysjobs (name, enabled)
  • sysjobschedules (next_run_date, next_run_time)
  • sysschedules (enabled)
  • syscategories (name)

Here is the query syntax:

Here is sample output:

SQL Query Upcoming Agent Job Schedule

 

Additional Content

Check out more examples by visiting my Home Page

Here you will find topics covering  Qlikview  SQL Server  Excel VBA

Leave a Comment