-1

Work on C# VS2010 console application. My solution contains three projects. I set this solution exe on window schedule, Every morning scheduler active my solution projects consecutively , they work perfectly ,but In every morning I want to active Project1 in 9AM, Project2 in 10AM, Project3 in 11AM,how to active them in different time when they all are in a solution .Is there any idea how to active projects in custom time.

If have any query plz ask ,thanks in advanced

shamim
  • 6,640
  • 20
  • 85
  • 151
  • 1
    What are you running in the scheduler, the EXE produced by building the solution? Are there 3 EXEs? What does the VS solution have to do with this? Are you building the solution as part of the scheduled task? – bobbymcr Dec 21 '11 at 17:39
  • I was trying to edit this for clarity, but it turns out I don't completely understand the question. Bobbymcr asks a very important question here. – djdanlib Dec 21 '11 at 18:33
  • i get my answer ,thanks for all – shamim Dec 21 '11 at 20:29

1 Answers1

0

Make 3 scheduled tasks, each one will pass a different parameter (the project to run) to the executable.

In the run textbox of each scheduled task :
    solution.exe 1
    solution.exe 2
    solution.exe 3

In your code :
    static int Main(string[] args)
    {
        switch(args[0]);
        {
            case "1":
                project1.run();
            ....
        }
    }
Eric H
  • 1,759
  • 1
  • 11
  • 14