Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. windows service

windows service

Scheduled Pinned Locked Moved ASP.NET
help
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    ptvce
    wrote on last edited by
    #1

    Hi i want write a windows service and start it in spesific time and date but i dont know set a parameter for onstart method. can any body help me or give me a sample

    J 1 Reply Last reply
    0
    • P ptvce

      Hi i want write a windows service and start it in spesific time and date but i dont know set a parameter for onstart method. can any body help me or give me a sample

      J Offline
      J Offline
      J4amieC
      wrote on last edited by
      #2

      [Message Deleted]

      P 1 Reply Last reply
      0
      • J J4amieC

        [Message Deleted]

        P Offline
        P Offline
        ptvce
        wrote on last edited by
        #3

        can u say where should i ask?

        J 1 Reply Last reply
        0
        • P ptvce

          can u say where should i ask?

          J Offline
          J Offline
          Jaffer Mumtaz
          wrote on last edited by
          #4

          Hi, Windows services are program that runs in the background forever, however if you want to start your service at a particular time you will have to implement service controller. But i dont know why you want to do that. Just implement timer control and check for the event at which you want your windows service to do something Regards

          P 1 Reply Last reply
          0
          • J Jaffer Mumtaz

            Hi, Windows services are program that runs in the background forever, however if you want to start your service at a particular time you will have to implement service controller. But i dont know why you want to do that. Just implement timer control and check for the event at which you want your windows service to do something Regards

            P Offline
            P Offline
            ptvce
            wrote on last edited by
            #5

            i want it start a particulat time or date . my mean is i want run it in particular time or date. can write me a simple example about time plz. my behinde code is this: protected override void OnStart(string[] args) { //TODO: Add code here to start your service. ServiceController controller = new ServiceController(); string status = controller.Status.ToString(); eventLog1.WriteEntry("my service started"); //Start the service controller.Start(); //Stop the service controller.Stop(); } and how can we trace it?

            J 1 Reply Last reply
            0
            • P ptvce

              i want it start a particulat time or date . my mean is i want run it in particular time or date. can write me a simple example about time plz. my behinde code is this: protected override void OnStart(string[] args) { //TODO: Add code here to start your service. ServiceController controller = new ServiceController(); string status = controller.Status.ToString(); eventLog1.WriteEntry("my service started"); //Start the service controller.Start(); //Stop the service controller.Stop(); } and how can we trace it?

              J Offline
              J Offline
              Jaffer Mumtaz
              wrote on last edited by
              #6

              Have a look at the link. Hope you will extract information out of it. http://www.codeproject.com/KB/install/csharpsvclesson2.aspx[^]

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups