Wait-​Azure​Sql​Job​Execution

Waits for the provided job execution to complete.

Syntax

Wait-AzureSqlJobExecution
    [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
    [-Any]
    -JobExecutionId <Guid[]>
    [-TimeoutSeconds <Int32>]
    [<CommonParameters>]
Wait-AzureSqlJobExecution
    [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
    [-Any]
    -InputObject <JobExecutionInfo[]>
    [-TimeoutSeconds <Int32>]
    [<CommonParameters>]
Wait-AzureSqlJobExecution
    [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
    -JobName <String[]>
    [-TimeoutSeconds <Int32>]
    [<CommonParameters>]

Description

The Wait-AzureSqlJobExecution cmdlet waits for the provided job execution to complete.

Examples

Example 1: Wait for a specific job execute to complete

PS C:\>Wait-AzureSqlJobExecution -JobExecutionId 07981e74-5235-48a6-b24e-b5beb16a149a

This command waits for the provided job execution to complete.

Example 2: Wait for a specific job execution to complete after a time duration

PS C:\>Wait-AzureSqlJobExecution -JobExecutionId 07981e74-5235-48a6-b24e-b5beb16a149a -TimeoutSeconds 60

This command waits for the provided job execution to complete, timing out after 60 seconds.

Required Parameters

-InputObject

Specifies JobExecutionInfo object(s) on which to wait. JobExecutionInfo objects can be obtained using the Get-AzureSqlJobExecution cmdlet.

Type:JobExecutionInfo[]
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-JobExecutionId

Specifies the job execution ID.

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

Specifies the name of the job.

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

Optional Parameters

-Any

Indicates that the cmdlet will wait for only one provided job to complete rather than all.

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

Specifies the time duration before this cmdlet times out.

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