Condividi tramite


SPJobDefinition.Execute Method

Executes the job definition on the local machine and is intended to be used only by the timer service.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Overridable Sub Execute ( _
    targetInstanceId As Guid _
)
'Usage
Dim instance As SPJobDefinition
Dim targetInstanceId As Guid

instance.Execute(targetInstanceId)
public virtual void Execute(
    Guid targetInstanceId
)

Parameters

  • targetInstanceId
    Type: System.Guid

    For target types of SPContentDatabase this is the database ID of the content database being processed by the running job.

    This value is Guid.Empty for all other target types.

Remarks

This method is called by the timer service to execute a job, but is not intended as a way to start a job. The new RunNow() method or the Start-SPTimerJob cmdlet should be used instead.

See Also

Reference

SPJobDefinition Class

SPJobDefinition Members

Microsoft.SharePoint.Administration Namespace