D
Derek Hart
I am running a winforms app as a windows service on Windows 2008 server. I
have a timer that checks a database flag every 5 seconds. I want to limit
the number of times the timer can run, by keeping track of how many are
running. What is the best way to do this? Store this in a sql database
table. Just check the value in the database and increment or decrement,
while stopping the timer at the max value? Will that be reliable? Store in a
plain old global variable inside the service?
have a timer that checks a database flag every 5 seconds. I want to limit
the number of times the timer can run, by keeping track of how many are
running. What is the best way to do this? Store this in a sql database
table. Just check the value in the database and increment or decrement,
while stopping the timer at the max value? Will that be reliable? Store in a
plain old global variable inside the service?