Content deployment jobs can be configured to run on a specific schedule or to only run when instructed to manually. In either case, we can manually start the content deployment job. In this recipe, we will manually start the deployment job created in the Creating the content deployment job recipe.
Follow these steps to start the content deployment job:
Manually starting the content deployment job instructs the SharePoint timer job associated with the content deployment job to execute at the current date and time. Once the timer job runs, it will start the deployment job.
Starting a content deployment job may also be accomplished with PowerShell or code using the server-side object model.
Follow these steps to start the content deployment job using PowerShell:
Get-SPContentDeploymentJob
Cmdlet as follows:Get-SPContentDeploymentJob
Start-SPContentDeploymentJob
Cmdlet:Start-SPContentDeploymentJob "Staging Deployment Job"
Follow these steps to start the content deployment job with code using the server-side object model:
var job = Microsoft.SharePoint.Publishing.Administration.ContentDeploymentJob.GetInstance("Job Name");
job.Run();
3.144.38.92