Ad Widget

Collapse

Improve nextcheck calculation, allow interval-based disabling of items-checks

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TuXator
    Junior Member
    • Feb 2009
    • 15

    #1

    Improve nextcheck calculation, allow interval-based disabling of items-checks

    Hi!

    The attached patch greatly improves the calculation of an items nextcheck-time if flexible intervals are specified.

    The current code only calculates the next check time based on the interval that is _currently_ active. However, a correct approach should consider all intervals and calculate the earliest check time of them. This is what my patch does.

    It also accepts a delay time of zero if and only if there are other (flexible) delays specified. This allows you to switch off item checks e.g. during the night hours:

    So if you'd like to check an item only from Monday to Friday during office hours, just specify 0 as the "normal" delay and enter a flexible delay of e.g. 90 seconds during the following interval: 1-5,08:00-18:00.

    Cheers,
    --leo
    Attached Files
  • tighep
    Senior Member
    • Dec 2007
    • 124

    #2
    That sounds like a great feature, I assume this was written against the 1.6.4 code?

    Comment

    • TuXator
      Junior Member
      • Feb 2009
      • 15

      #3
      Originally posted by tighep
      That sounds like a great feature, I assume this was written against the 1.6.4 code?
      Yes. But similar functionality had already been added to the development tree, somehow I missed that. Unfortunately this implementation looks incomplete to me, see the corresponding bug-report for details:



      Cheers,
      --leo

      Comment

      Working...