Results 1 to 2 of 2

Thread: Puzzling Timer behaviour

  1. #1

    Thread Starter
    Hyperactive Member Foxer's Avatar
    Join Date
    Oct 2001
    Location
    Australia
    Posts
    278

    Puzzling Timer behaviour

    Can I use a Timer in a .Net Windows Service that I create?

    Like, you can't use an interface (you can if you're tricky), but is a timer okay?

    My On_Start Event is empty because I have a timer that is suppose to fire every minute, but it doesn't, and I've NFI why.

    Enabled is True and interval is 60000.

    There are no errors in the event log. Nothing happens. I know it doesn't fire because I write to the event log in timer tick event so I'll know when it fires. It just doesn't fire.

    Are Timers allowed in an NT Service? I thought they would be integral considering the nature of services.
    Rate my response if I helped

    Go Hard Or Go Home


  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    Use System.Timers.Timer not System.Windows.Forms.Timer
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width