Skip to content

How to add task to windows service

shah

Asked May 9, 2007, 2:45 AM EDT10 answers
Share
LinkedInX
I have done one application now which is about scheduling application. Now I was looking for windows service and how to do add so i created new project in the existing project of my form. Now the query is "how I would add any of my task in windows services?" I have form done full of different controls where i can add the task and delete it but how to add to any windows service? juts guide me some steps please?

10 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Mahesh Chand
    0
    You have to create a Windows Service application using Visual Studio. After that, you can either put your code in this service or call external application from the service using the Process class. See Windows Service section of C# Corner for more articles and source code samples.
    0
  • 0
    Do we need to setup registry as well in my schedule application? Please do some more advise?
    0
  • 0
    One more problem is i have main method defined in 2 places one if the main form schedule.cs and one in windowsService.cs? Is there anyway that i run my form from main method of windowsService.cs? What can be done for that?
    0
  • 0
    ok i think i am misleading everybody. Following what i have and what i want to do I have form1.cs which have different events and what i am doing on this form is adding some tasks in ListView. Now the next task is to add scheduling functionality to those tasks. How would you start implementing it? Can somebody please guide me the steps of tasks as how to add schedule functionality? Any guidance please?
    0
  • 0
    Please help..I am stucked..what to do?
    0
  • 0
    I am trying to make an application similar to as following: http://www.filedudes.com/JIT_Scheduler-screenshot-31062.html But in my case i have gui ready as JIT_Scheduler but now the tasks that has been added i want to schedule them how would you start it or what can be different ways to schedule them? Thanks
    0
  • Mike Gold
    0
    you can start a task by creating a batch file with the following code:

    net start <servicename>


    call the batch file using System.Diagnostics.Process.Start(<batch file name>)
    0
  • Mike Gold
    0
    Alternately, you can use the task scheduler built into Windows to Schedule Window Service tasks and have the task call the batch file  containing

    net start <myservice>
    0
  • 0
    I left this application as i cant do it anymore but its ok i will come back to it someother time. Thanks Mike anyway.
    0