Sdílet prostřednictvím


Get-AzureSqlJobSchedule

Gets one or multiple job schedules.

Syntax

Get-AzureSqlJobSchedule
   [-JobName <String>]
   [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
   [<CommonParameters>]
Get-AzureSqlJobSchedule
   -ScheduleName <String[]>
   [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
   [<CommonParameters>]

Description

The Get-AzureSqlJobSchedule cmdlet gets one or multiple job schedules. A schedule is a time specification for a job run to take place either on a reoccurring interval or at a single time.

Examples

Example 1: Get all job schedules

PS C:\>Get-AzureSqlJobSchedule
ScheduleName                  Interval                      StartTime                     EndTime

------------                  --------                      ---------                     -------

System schedule: telemetry    Days: 1                       12/31/1999 8:21:08 PM -08:00  12/31/9999 3:59:59 PM -08:00
System schedule: heartbeat    Minutes: 5                    1/1/0001 12:00:00 AM -08:00   12/31/9999 3:59:59 PM -08:00
System schedule: cleanup      Minutes: 5                    1/1/0001 12:00:00 AM -08:00   12/31/9999 3:59:59 PM -08:00
MyOneTimeSchedule             OneTime                       7/15/2015 7:00:00 AM -07:00   12/31/9999 3:59:59 PM -08:00
MyOneMinuteIntervalSchedule   Minutes: 1                    7/4/2015 7:00:00 AM -07:00    12/31/9999 3:59:59 PM -08:00
MyOneHourIntervalSchedule     Hours: 1                      7/4/2015 7:00:00 AM -07:00    12/31/9999 3:59:59 PM -08:00
MyOneDayIntervalSchedule      Days: 1                       7/4/2015 7:00:00 AM -07:00    12/31/9999 3:59:59 PM -08:00

This command gets all job schedules.

Example 2: Get the job schedule for a specified schedule

PS C:\>Get-AzureSqlJobSchedule -ScheduleName "MyOneTimeSchedule"
ScheduleName                  Interval                      StartTime                     EndTime
------------                  --------                      ---------                     -------
MyOneTimeSchedule             OneTime                       7/15/2015 7:00:00 AM -07:00   12/31/9999 3:59:59 PM -08:00

This command gets the schedule for the schedule named MyOneTimeSchedule.

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. When specified, this cmdlet returns schedules bounded to the provided job name through a trigger.

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

-ScheduleName

Specifies the name of the schedule that this cmdlet gets.

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