@@ -, +, @@ perl misc/cronjobs/holds/holds_reminder.pl -day 1 --date '2023-09-12' -v UPDATE reserves SET expirationdate = DATE_SUB(CURDATE(), INTERVAL 1 DAY); --- misc/cronjobs/holds/holds_reminder.pl | 1 + 1 file changed, 1 insertion(+) --- a/misc/cronjobs/holds/holds_reminder.pl +++ a/misc/cronjobs/holds/holds_reminder.pl @@ -260,6 +260,7 @@ foreach my $branchcode (@branchcodes) { #BEGIN BRANCH LOOP my $reserves = Koha::Holds->search({ waitingdate => {$comparator => $waiting_since }, 'me.branchcode' => $branchcode, + '-or' => [ expirationdate => undef, expirationdate => { '>' => \'CURDATE()' } ] },{ prefetch => 'patron' }); $verbose and warn "No reserves found for $branchcode\n" unless $reserves->count; --