Partilhar via


Propriedade do RDL JobSchedule.FrequencyInterval

Gets or sets the frequency interval, which determines how often the job is scheduled to run.

Namespace:  Microsoft.SqlServer.Management.Smo.Agent
Assembly:  Microsoft.SqlServer.Smo (em Microsoft.SqlServer.Smo.dll)

Sintaxe

'Declaração
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public Property FrequencyInterval As Integer 
    Get 
    Set
'Uso
Dim instance As JobSchedule 
Dim value As Integer 

value = instance.FrequencyInterval

instance.FrequencyInterval = value
[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
public int FrequencyInterval { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::Standalone)]
public:
property int FrequencyInterval {
    int get ();
    void set (int value);
}
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone)>]
member FrequencyInterval : int with get, set
function get FrequencyInterval () : int 
function set FrequencyInterval (value : int)

Valor da propriedade

Tipo: System.Int32
An Int32 value that specifies the frequency interval.

Comentários

FrequencyInterval is always interpreted relative to the value of the FrequencyTypes property. FrequencyInterval is interpreted using these values.

FrequencyInterval value

FrequencyTypes value

FrequencyInterval is not applicable.

FrequencyTypes.Unknown

FrequencyInterval is not applicable. The schedule runs once only.

FrequencyTypes.OneTime

An integer value that specifies the number of days. For example, when FrequencyInterval property is 3, the schedule job runs every third day.

FrequencyTypes.Daily

A bit flag long integer value that specifies the days of the week using the WeekDays enumeration.

WeekDays.Sunday = 1

WeekDays.Monday = 2

WeekDays.Tuesday = 4

WeekDays.Wednesday = 8

WeekDays.Thursday = 16

WeekDays.Friday = 32

WeekDays.Saturday = 64

WeekDays.WeekDays = 62

WeekDays.WeekEnds = 65

WeekDays.EveryDay = 127

Combine values using an OR logical operator to set more than a single day. For example, combine WeekDays.Monday and WeekDays.Friday (FrequencyInterval = 2 + 32 = 34) to schedule an activity for Monday and Friday.

FrequencyTypes.Weekly

An integer that specifies the ordinal day of the month on which the schedule is active. For example, 4 specifies the fourth day of the month.

FrequencyTypes.Monthly

When the FrequencyTypes property is set to MonthlyRelative, the FrequencyRelativeIntervals and the FrequencyInterval properties must be set to specify which occurrence of which day of the week within the month. For example, if FrequencyRelativeIntervals property is set to 2 and the FrequencyInterval is set to Friday the scheduled job runs on the second Friday of every month. The MonthlyRelativeWeekDays enumeration contains days of the week that can assigned to the FrequencyInterval property.

FrequencyTypes.MonthlyRelative

FrequencyInterval is not applicable. The schedule runs when SQL Server is started.

FrequencyTypes.AutoStart

FrequencyInterval is not applicable. The schedule runs when the processor that run the instance of SQL Server is idle.

FrequencyTypes.OnIdle

FrequencyInterval is not applicable.

FrequencyTypes.Valid

Exemplos

Agendando tarefas administrativas automáticas no SQL Server Agent

Consulte também

Referência

JobSchedule Classe

Namespace Microsoft.SqlServer.Management.Smo.Agent

Outros recursos

Tarefas de administração automatizadas (SQL Server Agent)

sp_add_schedule (Transact-SQL)