I have a windows service that needs run a method every 1 min. I'm using a System.Threading.Timer and it works fine for 30-35 min and then the method stops running without any error
My code looks like this
Variables
private static int intervalSend = 60000;
private TimerCallback callback;
private static Timer sendTimer;
Init
callback = new TimerCallback(SendAliveInquiry);
sendTimer = new System.Threading.Timer(callback, null, 0, intervalSend);
Method
private void SendAliveInquiry(object obj)
{
Method logic
}
Any idea why it stops running after a while?