<<

NAME

holds_reminder.pl - prepare reminder messages to be sent to patrons with waiting holds

SYNOPSIS

holds_reminder.pl -lettercode <notice to send> [ -c ][ -v ][ -library <branchcode> ][ -library <branchcode> ... ] [ -days <number of days> ][ -mtt <transport type> ... ][ -holidays ] [ -date <YYYY-MM-DD> ]

 Options:
   -help                          brief help message
   -man                           full documentation
   -v                             verbose
   -c --confirm                   confirm, if not set no email will be sent
   -days          <days>          days waiting to deal with
   -t --triggered                 include only holds <days> days waiting, and not longer
   -lettercode   <lettercode>     predefined notice to use, default is HOLD_REMINDER
   -library      <branchname>     only deal with holds from this library (repeatable : several libraries can be given)
   -holidays                      use the calendar to not count holidays as waiting days
   -mtt          <message_transport_type> type of messages to send, default is to use patrons messaging preferences for Hold reminder
                                  populating this will force send even if patron has not chosen to receive hold notices
                                  email and sms will fallback to print if borrower does not have an address/phone
   -date                          Send notices as would have been sent on a specific date

OPTIONS

-help

Print a brief help message and exits.

-man

Prints the manual page and exits.

-v

Verbose. Without this flag set, only fatal errors are reported.

--confirm | -c

Confirm. Unless set this script does not send any email (test-mode). If verbose and not confirm a list of notices that would have been sent to the patrons are printed to standard out.

-days

Optional parameter, number of days an items has been 'waiting' on hold to send a message for. If not included a notice will be sent to all patrons with waiting holds.

-t | --triggered

Optional parameter, only send notices for holds exactly <days> waiting. If not included a notice will be sent to all patrons with waiting holds equal to OR greater than <days>. This option is useful if the cron is being run daily to avoid spamming the patrons.

-lettercode

Optional parameter, choose a notice to use. Default is 'HOLD_REMINDER'.

-library

select notices for one specific library. Use the value in the branches.branchcode table. This option can be repeated in order to select notices for a group of libraries.

-holidays

This option determines whether library holidays are used when calculating how long an item has been waiting. If enabled the count will skip closed days.

-date

use it in order to send notices on a specific date and not Now. Format: YYYY-MM-DD.

-mtt

send a notices via a specific transport, this can be repeated to send various notices. If omitted the patron's messaging preferences for Hold notices will be used. If supplied the notice types will be force sent even if patron has not selected hold notices Email and SMS will fall back to print if there is no valid info in the patron's account

DESCRIPTION

This script is designed to alert patrons of waiting holds.

Configuration

This script sends reminders to patrons with waiting holds using a notice defined in the Tools > Notices and slips module within Koha. The lettercode is passed into this script and, along with other options, determine the content of the notices sent to patrons.

USAGE EXAMPLES

holds_reminder.pl - With no arguments the simple help is printed

holds_reminder.pl In this most basic usage all libraries are processed individually, and notices are prepared for all patrons with waiting holds for whom we have email addresses. Messages for those patrons for whom we have no email address are sent in a single attachment to the library administrator's email address, or to the address in the KohaAdminEmailAddress system preference.

holds_reminder.pl -n -csv /tmp/holds_reminder.csv - sends no email and populates /tmp/holds_reminder.csv with information about all waiting holds items.

holds_reminder.pl -library MAIN -days 14 - prepare notices of holds waiting for 2 weeks for the MAIN library.

holds_reminder.pl -lettercode LATE_HOLDS -library MAIN -days 14 - prepare notices of holds waiting for 2 weeks for the MAIN library. Use lettercode 'LATE_HOLDS'

<<