Sdílet prostřednictvím


New-AzureSqlJobTrigger

Creates a mapping of job to schedules.

Syntax

New-AzureSqlJobTrigger
   -JobName <String>
   -ScheduleName <String>
   [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
   [<CommonParameters>]

Description

The New-AzureSqlJobTrigger cmdlet creates a mapping of job to schedules. In accordance to the schedule definition, job runs are triggered for each job or schedule mapping.

Examples

Example 1: Create a trigger for a job to run according to a specified schedule

PS C:\>New-AzureSqlJobTrigger -JobName "MyJob" -ScheduleName "MyOneMinuteIntervalSchedule"
JobName                                              ScheduleName                                                                                     Enabled
-------                                              ------------                                                                                     -------
MyJob                                                MyOneMinuteIntervalSchedule                                                                         True

This command creates a trigger for a job named MyJob to run according to the schedule named MyOneMinuteIntervalSchedule.

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

-JobName

Specifies the name of the job.

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

-ScheduleName

Specifies the name of the schedule.

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