Set Job Execution Shutdown

Applies to: SQL Server Azure SQL Managed Instance

Important

On Azure SQL Managed Instance, most, but not all SQL Server Agent features are currently supported. See Azure SQL Managed Instance T-SQL differences from SQL Server for details.

This topic describes how to set the time that Microsoft SQL Server Agent will wait for executing jobs to finish before SQL Server Agent itself finishes in SQL Server by using SQL Server Management Studio.

Before You Begin

Security

Permissions

By default, members of the sysadmin fixed server role can set the time that Microsoft SQL Server Agent will wait for executing jobs to finish before SQL Server Agent itself finishes. Other users must be granted one of the following SQL Server Agent fixed database roles in the msdb database:

  • SQLAgentUserRole

  • SQLAgentReaderRole

  • SQLAgentOperatorRole

Using SQL Server Management Studio

To set job execution shutdown

  1. In Object Explorer, , click the plus sign to expand the server where you want to set a job execution shutdown interval.

  2. Right-click SQL Server Agent and select Properties.

  3. Under Select a page, select Job System.

  4. Set the Shutdown time-out interval in seconds to increase or decrease the shutdown time-out interval. This determines how long SQL Server Agent will wait for executing jobs to finish before SQL Server Agent itself finishes.