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)
committerGalen Charlton <galen.charlton@liblime.com>
Tue, 21 Oct 2008 15:35:34 +0000 (10:35 -0500)
commit4104c697574f68614c349fa35fba80d1009b2015
treed2a6001783d4a7f18e4ebedcb3a0856abb327094
parent16fef8ba3e18c12347f35ff24a43c20d7ee53a8c
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