共用方式為


JobSchedule.ActiveStartDate 屬性

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

命名空間:  Microsoft.SqlServer.Management.Smo.Agent
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public Property ActiveStartDate As DateTime 
    Get 
    Set
'用途
Dim instance As JobSchedule 
Dim value As DateTime 

value = instance.ActiveStartDate

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

屬性值

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

備註

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 ActiveStartDate property to set the date when the schedule goes into effect.

If the ActiveStartDate property has not been set, the DateTime.MinValue is returned, which is Jan 1, 1999.

The scheduled start date depends on when the schedule is assigned to the job. For example, you create a schedule that runs every other Monday at 8:00 A.M. If you create a job at 10:00 A.M. on Monday, March 3, 2008, the schedule start date is Monday, March 17, 2008. If you create another job on Tuesday, March 4, 2008, the schedule start date is Monday, March 10, 2008.

範例

使用 SQL Server Agent 排程自動管理工作

請參閱

參考

JobSchedule 類別

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

其他資源

自動化管理工作 (SQL Server Agent)

sp_add_schedule (Transact-SQL)