On Sat, 12 Apr 2008 09:18:24 -0700, jediknight <wa*****@gmail.comwrote:
[...]
I have an application which needs to insert a log line into the
database table at certain times of the day.
These times are every 15minutes from midnight to midnight (24hours).
The logging needs to start at exactly 12am and then every 15 minutes.
Is there a simple way to implement this?
Well, there are at least three different Timer classes in .NET, any one of
which might be suitable for solving your problem. A search on MSDN for
"Timer class" should turn them up for you. See
System.Windows.Forms.Timer, System.Threading.Timer, and
System.Timers.Timer.
Any one of those classes would be suitable for causing some specific code
to execute starting at a specific time, and then repeating at specific
intervals. Each class provides slightly different semantics, so the exact
implementation would vary according to which class you chose to use.
Other than that, without more specifics from you about how you want to go
about solving the problem and what sort of application you're dealing
with, it'd be hard to offer more specific advice.
Pete