Time issue

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jediknight

    Time issue

    Hi,

    I have a problem to solve and not quite sure about the best way to
    solve it.
    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?

    Thanks in advance.
  • Peter Duniho

    #2
    Re: Time issue

    On Sat, 12 Apr 2008 09:18:24 -0700, jediknight <wakthar@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.Threadin g.Timer, and
    System.Timers.T imer.

    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

    Comment

    Working...