New-AzureSqlJobExecutionPolicy

Creates an execution policy which controls job execution timeouts.

Syntax

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

Description

The New-AzureSqlJobExecutionPolicy cmdlet creates an execution policy which controls job execution timeouts, retry limits and intervals between job task execution retries.

Examples

Example 1: Create an execution policy

PS C:\>New-AzureSqlDatabaseJobExecutionPolicy -ExecutionPolicyName "MyCustomExecutionPolicyName" -JobExecutionTimeout ([System.TimeSpan]::FromHours(1)) -InitialRetryInterval ([System.TimeSpan]::FromSeconds(1)) -RetryIntervalBackoffCoefficient 1.0 -MaximumAttempts 100 -MaximumRetryInterval ([System.TimeSpan]::FromSeconds(30))
ExecutionPolicyName             : myCustomExecutionPolicyName
JobExecutionTimeout             : 01:00:00
InitialRetryInterval            : 00:00:01
RetryIntervalBackoffCoefficient : 1
MaximumRetryInterval            : 00:00:30
MaximumAttempts                 : 100

This command creates an execution policy named MyCustomExecutionPolicyName.

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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ExecutionPolicyName

Specifies the execution policy name.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-InitialRetryInterval

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

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

-JobExecutionTimeout

Specifies the timeout to enforce for overall job execution time.

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

-MaximumAttempts

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

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

-MaximumRetryInterval

Specifies the maximum time between retry attempts.

Type:TimeSpan
Position:Named
Default value:None
Required:False
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False