문서를 영문으로 보려면 영문 확인란을 선택하세요. 마우스 포인터를 텍스트 위로 이동시켜 팝업 창에서 영문 텍스트를 표시할 수도 있습니다.
번역
영문

Job.HasSchedule 속성

Gets the Boolean property value that specifies whether the job has at least one schedule.

네임스페이스:  Microsoft.SqlServer.Management.Smo.Agent
어셈블리:  Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)

[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Expensive|SfcPropertyFlags.Standalone)]
public bool HasSchedule { get; }

속성 값

유형: System.Boolean
A Boolean value that specifies whether the job has a schedule assigned or not.If True, the job has at least one schedule. If False (default), the job has no schedule.

You can query the JobSchedules collection property to evaluate which schedule is enabled for the job. If the HasSchedule property is False, the JobSchedules collection property is empty.

The following code example specifies that the job has at least one schedule.

C#

Server srv = new Server("(local)");
Job jb = new Job(srv.JobServer, "Test Job");
jb.HasSchedule = true;

PowerShell

$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")
$jb = new-object Microsoft.SqlServer.Management.Smo.Agent.Job($srv.JobServer, "Test Job")
$jb.HasSchedule = $TRUE

커뮤니티 추가 항목

추가
표시: