Is there an upward limit to the System.Timers.Timer.Interval value?

  • Thread starter Thread starter Carlo Razzeto
  • Start date Start date
C

Carlo Razzeto

I am using a timer in my Windows service previously discussed in my previous
post to send warning e-mails to users who's account activity idle for a
given number of days. Currently I have it set for 30 days, which I multiply
by a base value for one day in milliseconds. The value that is currently
being used is: 2592000000, which when divided by 24 * (60^2) * 1000 comes
out to 30 days as it should. Can the timer not be used in this way? If it
can't how does one accomplish this type of timing?

Carlo
 
You don't need a timer for that, just calculate a timespan between now and
the last activity date on the user's account. If it's greater than 30 days,
send an e-mail. Then you can use a timer or a sleep function in short
timespans to peek the accounts and send mails to the ones that exceed the
calculated timespan.
Hope this helps.

Agustin
 
Agustin Sanchez said:
You don't need a timer for that, just calculate a timespan between now and
the last activity date on the user's account. If it's greater than 30 days,
send an e-mail. Then you can use a timer or a sleep function in short
timespans to peek the accounts and send mails to the ones that exceed the
calculated timespan.
Hope this helps.

Agustin

I was hoping to avoid that, seems a little waistful to me. But I guess if
that's how it must be done, then oh well....

Carlo
 
Back
Top