Share via


SPUpgradeJobDefinition.Execute method

Executes the upgrade or migration that is specified by the job definition.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Overrides Sub Execute ( _
    targetInstanceId As Guid _
)
'Usage
Dim instance As SPUpgradeJobDefinition
Dim targetInstanceId As Guid

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

Parameters

  • targetInstanceId
    Type: System.Guid

    The value passed in this parameter is ignored. Pass a value of Guid.Empty

Remarks

This method starts the upgrade job and tracks its progress. The bulk of the work is done by an internal call to RunUpgradeSession or RunMigrateSession. Which one of these two methods is called depends on the value of the Mode property. In either case, the value of the Object property is passed as an argument, specifying the root object for the upgrade job. The upgrade manager then creates a tree of upgrade delegate objects and processes them recursively. Progress is reported back through an event handler, which updates the CurrentDelegate(), CurrentObject(), CurrentStep(), TotalSteps(), and DelegateProgress() properties.

See also

Reference

SPUpgradeJobDefinition class

SPUpgradeJobDefinition members

Microsoft.SharePoint.Administration namespace

Object

Mode