Bug 2660: Add command-line options to overdue notice script.
authorRyan Higgins <rch@liblime.com>
Fri, 17 Oct 2008 03:25:27 +0000 (22:25 -0500)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 12 Nov 2008 14:01:22 +0000 (15:01 +0100)
commita8d24fdeaf7ebc669410c0d27c21366050d1acfd
tree8a8c092e73e0bfa977c5ddf1e58b67b124fa12c3
parent3c6dc64db7c2e18d4bd3e15c7140d90d3fa6978f
Bug 2660: Add command-line options to overdue notice script.

This commit adds two options to the overdue_notices.pl script.
The notices are now generated in one of two modes: default or triggered.
In default mode, every time the script runs, a notice is generated if an item
is overdue within a notice date range.  This mode is suitable for a weekly cron
(or manual run), but the notice triggers should be syncronized with the cron script such that
the script is run once per notice date range.  Otherwise, duplicate messages will
be generated ( or no notice generated if a notice date range passes without the script being run).
Triggered mode is suitable for a nightly cron job: a notice is generated only on those
days that an overdue item enters a notice date range.  This mode is susceptible to message
loss when the cron script fails to run, or when notice triggers are edited.

A second flag is added: --list-all, which causes items.content to list all currently overdue items.
Without this flag, only items that are overdue within the given notice's date range are listed on
that notice.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
misc/cronjobs/overdue_notices.pl