Timer event

  • Thread starter Thread starter Andy
  • Start date Start date
A

Andy

Hi all

Is it possible to fire the System.Timers.Timer just once a day? I mostly
worked in VB6 where my timer is limited to once a minute?

TIA
Andy
 
Andy said:
Hi all

Is it possible to fire the System.Timers.Timer just once a day? I
mostly worked in VB6 where my timer is limited to once a minute?

Set the interval to e.g 1 minute. In the tick elapsed event, check the
timespan between now and the last time the once-per-day-action has taken
place. If comparison resulst in >= 1 day, start the once-per-day-action and
store the date.
 
Hello,

Andy said:
Is it possible to fire the System.Timers.Timer just once
a day? I mostly worked in VB6 where my timer is limited
to once a minute?

That should work. The timer's 'Interval' property is a Double.

Regards,
Herfried K. Wagner
 
I am trying to fire the timer event based on a time component. Say at
22:00:00 every day. More like a scheduled task inside a service. Has anyone
done something like that

Regards,
-Mujahid
 
Back
Top