3 # Copyright 2009-2010 Kyle Hall
4 # Copyright 2020 PTFS Europe
6 # This file is part of Koha.
8 # Koha is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or
11 # (at your option) any later version.
13 # Koha is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with Koha; if not, see <http://www.gnu.org/licenses>.
23 cancel_expired_holds.pl - cron script to cancel holds as they expire
27 ./cancel_expired_holds.pl
28 ./cancel_expired_holds.pl --reason="EXPIRED"
32 0 1 * * * cancel_expired_holds.pl
33 0 1 * * * cancel_expired_holds.pl --reason="EXPIRED"
37 This script calls C4::Reserves::CancelExpiredReserves which will find and cancel all expired reseves in the system.
46 # find Koha's Perl modules
47 # test carefully before changing this
49 eval { require "$FindBin::Bin/../kohalib.pl" };
52 use Koha::Script -cron;
62 Print a brief help message and exits.
66 Optionally adds a reason for cancellation (which will trigger a notice to be sent to the patron)
77 'reason=s' => \$reason
79 pod2usage(1) if $help;
83 CancelExpiredReserves($reason);