<<

NAME

automatic_renewals.pl - cron script to renew loans

SYNOPSIS

./automatic_renewals.pl [-c|--confirm] [-s|--send-notices] [-d|--digest] [-b|--digest-per-branch] [-v|--verbose]

or, in crontab: # Once every day for digest messages 0 3 * * * automatic_renewals.pl -c -d # Three times a day for non digest messages 0 0,8,16 * * * automatic_renewals.pl -c

DESCRIPTION

This script searches for issues scheduled for automatic renewal (issues.auto_renew). If there are still renews left (Renewals allowed) and the renewal isn't premature (No Renewal before) the issue is renewed.

OPTIONS

-s|--send-notices

DEPRECATED: The system preference AutoRenewalNotices should be used to determine whether notices are sent or not Send AUTO_RENEWALS notices to patrons if the auto renewal has been done.

-v|--verbose

Print report to standard out.

-c|--confirm

Without this parameter no changes will be made

-b|--digest-per-branch

Flag to indicate that generation of message digests should be performed separately for each branch.

A patron could potentially have loans at several different branches There is no natural branch to set as the sender on the aggregated message in this situation so the default behavior is to use the borrowers home branch. This could surprise to the borrower when message sender is a library where they have not borrowed anything.

Enabling this flag ensures that the issuing library is the sender of the digested message. It has no effect unless the borrower has chosen 'Digests only' on the advance messages.

METHODS

send_digests

    send_digests({
        digests => ...,
        letter_code => ...,
    })

Enqueue digested letters.

Parameters:

$digests

Reference to the array of digested messages.

$letter_code

String that denote the letter code.

<<