diff --git a/misc/cronjobs/holds/holds_reminder.pl b/misc/cronjobs/holds/holds_reminder.pl index 92d2dfc8bd..ac2ead3abe 100755 --- a/misc/cronjobs/holds/holds_reminder.pl +++ b/misc/cronjobs/holds/holds_reminder.pl @@ -120,7 +120,6 @@ If omitted the patron's messaging preferences for Hold notices will be used. If supplied the notice types will be force sent even if patron has not selected hold notices Email and SMS will fall back to print if there is no valid info in the patron's account - =back =head1 DESCRIPTION @@ -244,8 +243,13 @@ foreach my $branchcode (@branchcodes) { #BEGIN BRANCH LOOP my $waiting_date; if ($use_calendar) { my $calendar = Koha::Calendar->new( branchcode => $branchcode, days_mode => 'Calendar' ); - my $duration = DateTime::Duration->new( days => -$days ); - $waiting_date = $calendar->addDays( $date_to_run, $duration ); #Add negative of days + + #if today is a holiday skip sending the message + next if $calendar->is_holiday($date_to_run); + { + my $duration = DateTime::Duration->new( days => -$days ); + $waiting_date = $calendar->addDays( $date_to_run, $duration ); #Add negative of days + } } else { $waiting_date = $waiting_date_static; }