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 run a console application within the execute method of a timer job in SharePoint 2010. Please guide me to do this by providing samples or links or hints.

share|improve this question
A console app doesn't seem like the right solution.could you explain a bit about what you are trying to do – Anders Rask Nov 30 '11 at 6:57

Not sure why you would want to run an external application from a SharePoint timer job, however, you could try using the Process() class in C# (this isn't a SharePoint-specific example, but is how you launch external processes from .NET code):

Process pr = new Process(); 
pr.StartInfo.FileName = "Notepad.exe"; 
pr.StartInfo.Arguments = "test.dat"; 
while (pr.HasExited == false)
     if ((DateTime.Now.Second % 5) == 0)
     { // Show a tick every five seconds.

Sample from:

I'm not sure if SharePoint will allow this, but it's worth a shot.

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.