<<

NAME

advance_notices.pl - cron script to put item due reminders into message queue

SYNOPSIS

./advance_notices.pl -c

or, in crontab: 0 1 * * * advance_notices.pl -c

DESCRIPTION

This script prepares pre-due and item due reminders to be sent to patrons. It queues them in the message queue, which is processed by the process_message_queue.pl cronjob. The type and timing of the messages can be configured by the patrons in their "My Alerts" tab in the OPAC.

NAME

advance_notices.pl - prepare messages to be sent to patrons for nearly due, or due, items

SYNOPSIS

advance_notices.pl [ -n ][ -m <number of days> ][ --itemscontent <comma separated field list> ][ -c ]

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.

-n

Do not send any email. Advanced or due notices that would have been sent to the patrons are printed to standard out.

-m

Defines the maximum number of days in advance to send advance notices.

-c

Confirm flag: Add this option. The script will only print a usage statement otherwise.

--itemscontent

comma separated list of fields that get substituted into templates in places of the <<items.content>> placeholder. This defaults to due date,title,author,barcode

Other possible values come from fields in the biblios, items and issues tables.

DESCRIPTION

This script is designed to alert patrons when items are due, or coming due

Configuration

This script pays attention to the advanced notice configuration performed by borrowers in the OPAC, or by staff in the patron detail page of the intranet. The content of the messages is configured in Tools -> Notices and slips. Advanced notices use the PREDUE template, due notices use DUE. More information about the use of this section of Koha is available in the Koha manual.

Outgoing emails

Typically, messages are prepared for each patron with due items, and who have selected (or the library has elected for them) Advance or Due notices.

These emails are staged in the outgoing message queue, as are messages produced by other features of Koha. This message queue must be processed regularly by the misc/cronjobs/process_message_queue.pl program.

In the event that the -n flag is passed to this program, no emails are sent. Instead, messages are sent on standard output from this program. They may be redirected to a file if desired.

Templates

Templates can contain variables enclosed in double angle brackets like <<this>>. Those variables will be replaced with values specific to the overdue items or relevant patron. Available variables are:

<<items.content>>

one line for each item, each line containing a tab separated list of title, author, barcode, issuedate

<<borrowers.*>>

any field from the borrowers table

<<branches.*>>

any field from the branches table

SEE ALSO

The misc/cronjobs/overdue_notices.pl program allows you to send messages to patrons when their messages are overdue.

METHODS

parse_letter

get_branch_info

<<