@@ -, +, @@ --- misc/cronjobs/recalls/expire_recalls.pl | 4 ++-- misc/cronjobs/recalls/overdue_recalls.pl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) --- a/misc/cronjobs/recalls/expire_recalls.pl +++ a/misc/cronjobs/recalls/expire_recalls.pl @@ -37,8 +37,8 @@ use C4::Log; cronlogaction(); -my @recalls = Koha::Recalls->search({ old => undef })->as_list; -foreach my $recall (@recalls) { +my $recalls = Koha::Recalls->search({ old => undef }); +while( my $recall = $recalls->next ) { if ( ( $recall->requested or $recall->overdue ) and $recall->expirationdate and dt_from_string( $recall->expirationdate ) < dt_from_string() ){ # recall is requested or overdue and has surpassed the specified expiration date $recall->set_expired({ interface => 'COMMANDLINE' }); --- a/misc/cronjobs/recalls/overdue_recalls.pl +++ a/misc/cronjobs/recalls/overdue_recalls.pl @@ -36,8 +36,8 @@ use C4::Log; cronlogaction(); -my @recalls = Koha::Recalls->search({ status => 'R' })->as_list; -foreach my $recall (@recalls){ +my $recalls = Koha::Recalls->search({ status => 'R' }); +while( my $recall = $recalls->next ) { if ( $recall->should_be_overdue ){ $recall->set_overdue({ interface => 'COMMANDLINE' }); } --