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. General Programming
  3. Windows Forms
  4. Windows Service

Windows Service

Scheduled Pinned Locked Moved Windows Forms
databasedebugginghelp
6 Posts 4 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.
  • V Offline
    V Offline
    varshavmane
    wrote on last edited by
    #1

    Hello All, I am totally new to Windows Service. Trying to develop Windows Service that run only 4 days in a year ie 1st Jan, 1st Apr, 1st Jul and 1st Oct (Quarterly basis). I took a timer but not able to set the Interval. I need to download data from some website on these days and push that data in Database. Can some one help me in setting the timer ... Also can I debug this service to check whether its working fine... Please help me... Thanks in advance...

    P R L 3 Replies Last reply
    0
    • V varshavmane

      Hello All, I am totally new to Windows Service. Trying to develop Windows Service that run only 4 days in a year ie 1st Jan, 1st Apr, 1st Jul and 1st Oct (Quarterly basis). I took a timer but not able to set the Interval. I need to download data from some website on these days and push that data in Database. Can some one help me in setting the timer ... Also can I debug this service to check whether its working fine... Please help me... Thanks in advance...

      P Offline
      P Offline
      Pavel Klocek
      wrote on last edited by
      #2

      You don't need to create a service. It's easier to create a simple console aplication and run it at required times using windows scheduler.

      Pavel

      V 1 Reply Last reply
      0
      • V varshavmane

        Hello All, I am totally new to Windows Service. Trying to develop Windows Service that run only 4 days in a year ie 1st Jan, 1st Apr, 1st Jul and 1st Oct (Quarterly basis). I took a timer but not able to set the Interval. I need to download data from some website on these days and push that data in Database. Can some one help me in setting the timer ... Also can I debug this service to check whether its working fine... Please help me... Thanks in advance...

        R Offline
        R Offline
        rtklueh
        wrote on last edited by
        #3

        You can attach the debugger to the service after it is running, and then set breakpoints in it to stop it and look in on things. If you need to see what it is doing when it first starts up, then just add some code to your service to sleep for a minute or so to give you time to attach the debugger right after you start the service.

        1 Reply Last reply
        0
        • V varshavmane

          Hello All, I am totally new to Windows Service. Trying to develop Windows Service that run only 4 days in a year ie 1st Jan, 1st Apr, 1st Jul and 1st Oct (Quarterly basis). I took a timer but not able to set the Interval. I need to download data from some website on these days and push that data in Database. Can some one help me in setting the timer ... Also can I debug this service to check whether its working fine... Please help me... Thanks in advance...

          L Offline
          L Offline
          lisan_al_ghaib
          wrote on last edited by
          #4

          Hi ! Why don't you use windows scheduler to run your your program? To have debug infomation make sure that you write all needed infotmation in a file for exemple.

          V 1 Reply Last reply
          0
          • P Pavel Klocek

            You don't need to create a service. It's easier to create a simple console aplication and run it at required times using windows scheduler.

            Pavel

            V Offline
            V Offline
            varshavmane
            wrote on last edited by
            #5

            Thanks Pavel. Would u pls give me a start for the same... Thanks again...

            1 Reply Last reply
            0
            • L lisan_al_ghaib

              Hi ! Why don't you use windows scheduler to run your your program? To have debug infomation make sure that you write all needed infotmation in a file for exemple.

              V Offline
              V Offline
              varshavmane
              wrote on last edited by
              #6

              Thanks for the reply. Would u pls give me a start for the same... Thanks again...

              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