JobSchedule.ActiveEndDate 属性

Gets or sets the date and time when the schedule ends.

命名空间:  Microsoft.SqlServer.Management.Smo.Agent
程序集:  Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)

语法

声明
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public Property ActiveEndDate As DateTime 
    Get 
    Set
用法
Dim instance As JobSchedule 
Dim value As DateTime 

value = instance.ActiveEndDate

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

属性值

类型:System.DateTime
A DateTime value that specifies the date and time when the job schedule ends.

注释

Scheduled SQL Server Agent jobs can have start and end dates. A job is run only between the start date and time and the end date and time. Alter the ActiveEndDate property to set the date when the schedule is no longer in effect.

If the ActiveEndDate property has not been set, the DateTime.MinValue is returned.

示例

在 SQL Server 代理中计划自动管理任务

请参阅

参考

JobSchedule 类

Microsoft.SqlServer.Management.Smo.Agent 命名空间

其他资源

自动执行管理任务(SQL Server 代理)

sp_add_schedule (Transact-SQL)