Using features of the Timer class (System.Timers) is a Windows service?

7

I need to do a check in the database once a day .

I'm thinking of using the class Timer (System.Timers) . Will the time contactor feature burden / slow down other system services?

Is this solution advisable within a Windows service?

System: C #, Windows Service project, event that triggers timer : OnStart() .

    
asked by anonymous 27.08.2014 / 22:16

1 answer

6

No, the class is made for what you want. With it you will "sign an event" with the operating system and a signage will be sent to your application when given the given time and will transfer the control to the code determined by you as soon as possible. So it does not count the time, it does not consume processing while waiting for the event to occur. It only notes an external event.

There may even be better solutions depending on what you want, but I'm trusting that what you need is something that only Timer solves. You may not even need a specific application for this. You can do something simpler, maybe even a script that gets scheduled in the operating system. Anyway, without knowing exactly its necessity I can not speak of an ideal solution. For what you posted, I think it's answered.

    
27.08.2014 / 22:23