SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to detect if a content deployment between two different sharepoint 2010 farms is finished. Is there a way to achieve this programmatically? I've been looking around for some days now but without success.

Are there any Event-Handlers or CustomActions I can use? At the moment I'm building my own deployment job using SPImportand SPExportbut that seems many overhead for me. All I need to do is to execute a simple function when the content deployment is finished.

Thank you very much! LMW

P.S. I'm using Sharepoint2010 and VS2010/C#

share|improve this question
up vote 1 down vote accepted

You have to check the ContentDeploymentJobStatus until it returns "Success". You can use code like below.

ContentDeploymentJobCollection cdJobCollection = ContentDeploymentJob.GetAllJobs();

                                   foreach (ContentDeploymentJob job in definitionCollection)
                                       if (job.Name.StartsWith(strYourJobName.ToLower()) && job.LastStatus==ContentDeploymentJobStatus.Success)
                                       return true;
share|improve this answer

What you can do is to send the success / error email to an email enabled SharePoint list. In that list you'll have a receiver on item added that can execute some code on the site collection / web app / farm ... depending on the elevation / work to be executed.

You could also do a little bit of screenscrapping on the central administration dashboards but that it's even clumsier than the first suggested solution.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.