[kronolith] v2.2 repeating reminders

Clarke Brunt clarke.brunt at viridis.net
Tue Jun 16 11:26:16 UTC 2009


Problem with reminder emails repeating each time the reminder cron job runs
until the event is over.

Observed in Kronolith v2.2 i.e. the one shipped with Debian lenny.

This looks to me like the same problem reported in a mailing list post
"Kronoliths repeats reminders for pre 2.2 events" by Andras Galos on 2008-11-12
15:29:18. He reports it in Kronolith 2.3.

I have analysed the problem. It occurs only for recurring events where the
original event start time is in the past (so the alarm is about one of the
later recurrences). There is a clue in that the email gives the original (in
the past) event time.

The version in v2.2 of kronolith/lib/Scheduler/kronolith.php includes the
change made between source control versions of the file 1.54 and 1.55 i.e.
http://cvs.horde.org/diff.php/kronolith/lib/Scheduler/kronolith.php?r1=1.54&r2=1.55
with comment "Recurrence processing happens in listAlarms() now.".

Although the recurrence processing is indeed now done there, with the
default argument to listAlarms, all that is returned is event ids (not
actual events). So when the event is then retrieved by getEvent(), the start
time in it is still the original (possibly in the past) time, and not the
time of the recurrence.

So the email is sent with the old original start time in it, and the code
attempting to garbage collect old events from the 'seen' array unsets the
memory that this reminder has been 'done' because it appears to be in the
past.

I've locally patched my v2.2 installation by reinstating the code block
removed in v1.55 of the file (with a few changes to compile against changes
in other modules).

My knowledge of the code isn't sufficient to know if it could be done better
in other ways, for example retrieve actual (with proper recurrence time)
events with listAlarms(). I see that HEAD version of the code has changed
radically in this area.

-- 
Clarke Brunt http://www.viridis.net/


More information about the kronolith mailing list