Set-​Azure​Sql​Job​Execution​Policy

Sets a job execution policy.

Syntax

Set-AzureSqlJobExecutionPolicy
   [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
   -ExecutionPolicyName <String[]>
   [-InitialRetryInterval <TimeSpan>]
   [-JobExecutionTimeout <TimeSpan>]
   [-MaximumAttempts <Int32>]
   [-MaximumRetryInterval <TimeSpan>]
   [-RetryIntervalBackoffCoefficient <Single>]
   [<CommonParameters>]

Description

The Set-AzureSqlJobExecutionPolicy cmdlet sets a job execution policy.

Examples

Example 1: Update an existing execution policy

PS C:\>Set-AzureSqlJobExecutionPolicy -ExecutionPolicyName myCustomExecutionPolicyName -JobExecutionTimeout ([System.TimeSpan]::FromHours(2))
ExecutionPolicyName             : myCustomExecutionPolicyName
JobExecutionTimeout             : 02:00:00
InitialRetryInterval            : 00:00:01
RetryIntervalBackoffCoefficient : 1
MaximumRetryInterval            : 00:00:30
MaximumAttempts                 : 100

This command updates an existing execution policy.

Required Parameters

-ExecutionPolicyName

Specifies the execution policy name.

Type:String[]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-AzureSqlJobConnection

Specifies the connection state object for the job. You can get the connection state object through the New-AzureSqlJobConnection cmdlet. If you do not specify this parameter, the connection state is used from a prior call to the Use-AzureSqlJobConnection cmdlet.

Type:AzureSqlJobConnection
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InitialRetryInterval

Specifies the time interval to use between job tasks following a job task execution failure.

Type:TimeSpan
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobExecutionTimeout

Specifies the timeout to enforce for overall job time.

Type:TimeSpan
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MaximumAttempts

Specifies the total number of job task execution retry attempts within a job.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MaximumRetryInterval

Specifies the maximum time to allow to pass between retry attempts.

Type:TimeSpan
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RetryIntervalBackoffCoefficient

Specifies the coefficient used to calculate the next interval between retries. The following formula is used: (Initial Retry Interval) * Math.pow((Interval Backoff Coefficient), (Number of Retries) - 2).

Type:Single
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False