Koha/misc/cronjobs
Nick Clemens 8ef9ac5445
Bug 37552: Wrap auto renewal attempt in eval to ensure script does not die
When libraries have a lot of checkouts, or an AMH, checkins can happen while the cron is running.

This patch simply adds an eval around the auto renewal attempt in case of early check in or other errors.

You can verify cron completed by enabling cronjob log in system preferences and checking the action logs

To test:
1 - Add 'sleep(10);' to automatic_renewals.pl
2 - Set circulation rules to enable automatic renewals
3 - Issue an item to a patron
4 - perl misc/cronjobs/automatic_renewals.pl -v
5 - Confirm item would not be renewed
6 - perl misc/cronjobs/automatic_renewals.pl -v -c
7 - Quickly check in the item
8 - The cronjob dies
    DBIx::Class::Row::update(): Can't update Koha::Schema::Result::Issue=HASH(0x586e1a674fb0): row not found at /kohadevbox/koha/Koha/Object.pm line 172
9 - Apply patch
10 - Checkout the item again
11 - perl misc/cronjobs/automatic_renewals.pl -v -c
12 - Quickly checkin the item
13 - You get a warning, but the cron completes

Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-16 17:33:49 +02:00
..
holds Bug 36330: Change 'reseve' to 'reserve' 2024-06-13 14:27:15 +01:00
recalls Bug 37271: Recall status should be 'requested' in overdue_recalls.pl 2024-07-12 10:21:29 +02:00
rss
social_data
thirdparty
advance_notices.pl
archive_purchase_suggestions.pl
automatic_checkin.pl
automatic_item_modification_by_age.pl
automatic_renewals.pl Bug 37552: Wrap auto renewal attempt in eval to ensure script does not die 2024-08-16 17:33:49 +02:00
backup.sh
batch_anonymise.pl
build_browser_and_cloud.pl
cart_to_shelf.pl
check-url-quick.pl
cleanup_database.pl
cloud-kw.pl Bug 36367: Remove context stack 2024-06-14 11:17:18 +01:00
cloud-sample.conf
CONFIGURE.gmail
create_koc_db.pl
crontab.example
debar_patrons_with_fines.pl
delete_items.pl
delete_patrons.pl
delete_records_via_leader.pl
edi_cron.pl
erm_run_harvester.pl
fines.pl
gather_print_notices.pl Bug 32575: Add an empty text body to fix multipart/mixed handling 2024-06-28 13:49:20 +02:00
import_webservice_batch.pl
longoverdue.pl Bug 37613: (Follow-up) Change the option and documentation to match terminology guidelines 2024-08-12 14:01:07 +02:00
membership_expiry.pl
merge_authorities.pl
notice_unprocessed_suggestions.pl
overdue_notices.pl
patron_emailer.pl
plugins_nightly.pl
printoverdues.sh
process_message_queue.pl Bug 37075: Message queue processor will fail to send any message unless letter_code is passed 2024-06-21 15:02:46 +02:00
purge_suggestions.pl
reconcile_balances.pl
remove_temporary_edifiles.pl
runreport.pl
serialsUpdate.pl
share_usage_with_koha_community.pl
sitemap.pl
staticfines.pl
stockrotation.pl
update_patrons_category.pl
update_totalissues.pl
writeoff_debts.pl Bug 34077: Allow to use --category-code as the only filter option 2024-06-13 14:16:05 +01:00