Sdílet prostřednictvím


Job.RemoveAllJobSchedules Method

Removes all shared and unshared schedules from the job.

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

Syntax

'Declaration
Public Sub RemoveAllJobSchedules
'Usage
Dim instance As Job

instance.RemoveAllJobSchedules()
public void RemoveAllJobSchedules()
public:
void RemoveAllJobSchedules()
member RemoveAllJobSchedules : unit -> unit 
public function RemoveAllJobSchedules()

Remarks

On successful execution, the JobSchedules collection property of the Job object is emptied. To reschedule the referenced job, create JobSchedule objects and add them to the JobSchedulescollection property of the Job object.