ContentDeploymentJob.Run method (Boolean, String)
Executes a content deployment job based on the type of transformation and the specified snapshot.
Namespace: Microsoft.SharePoint.Publishing.Administration
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
Public Sub Run ( _
runAsynchronously As Boolean, _
sourceContentDBSnapshotName As String _
)
'Usage
Dim instance As ContentDeploymentJob
Dim runAsynchronously As Boolean
Dim sourceContentDBSnapshotName As String
instance.Run(runAsynchronously, sourceContentDBSnapshotName)
public void Run(
bool runAsynchronously,
string sourceContentDBSnapshotName
)
Parameters
runAsynchronously
Type: System.BooleanA value that specifies whether to execute the content deployment job synchronously or asynchronously.
sourceContentDBSnapshotName
Type: System.StringA value that specifies the name of a SQL snapshot to be used for an export operation.
Exceptions
Exception | Condition |
---|---|
ContentDeploymentException | A specific reason is better described by the actual exception's message. Some common messages include:
|
SPException | Can be propagated from underlying Windows SharePoint Services (WSS) layers. |
Remarks
If runAsynchronously is true, the method will start to execute the content deployment job and can return before the content deployment job has executed, which in this case means that the export phase of the job will run in the timer service. Otherwise, the method will not return until the execution is complete; in this case, the export phase of the job will run in the current process.
The execution of the content deployment job is propagates content to the target normally as determined by the value of the ExportMethod property of the job.
If sourceContentDBSnapshotName is null or Empty, the use of the SQL snapshot for an export during the execution of the content deployment job is determined by the value of the SqlSnapshotSetting property (see the SqlSnapshotSetting property for more information). Otherwise, the content deployment job executes by using a SQL snapshot as specified by the sourceContentDBSnapshotName parameter for the export. In this case, if the SQL snapshot specified by the sourceContentDBSnapshotName parameter does not exist or if the SQL Server being used does not support SQL snapshots, then the execution of the job will fail.
If an attempt is made to execute a job that is already running or is in a timed out state (LastStatus property), the execution of the job will fail.