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
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
Comment