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 Bug 34854: (follow-up) Param name change + POD 2024-01-17 11:39:05 +01:00
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 Bug 36526: Remove circular dependency from Koha::Objects 2024-05-03 16:02:44 +02:00
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 Bug 28688: Add renewal to crontab example 2023-10-10 09:22:31 -03:00
debar_patrons_with_fines.pl Bug 15157: (QA follow-up) Some more changes 2023-11-08 11:41:30 -03:00
delete_items.pl
delete_patrons.pl Bug 15504: (QA follow-up) Final changes 2023-10-24 10:05:23 -03:00
delete_records_via_leader.pl
edi_cron.pl
erm_run_harvester.pl Bug 34587: (QA follow-up) Tidy 2023-10-31 16:46:32 -03:00
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 Bug 33418: Add overlay_framework option to connexion scripts 2024-05-10 16:45:50 +02:00
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 Bug 35001: Add some checks to membership_expiry 2023-10-24 15:44:32 -03:00
merge_authorities.pl
notice_unprocessed_suggestions.pl
overdue_notices.pl Bug 32740: Add a new option patron home library to OverdueNoticeFrom 2023-10-11 12:13:04 -03:00
patron_emailer.pl
plugins_nightly.pl Bug 35479: (QA follow-up): Tidy 2024-01-31 14:44:41 +01:00
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 Bug 33050: Tidy 2023-11-08 11:41:14 -03:00
serialsUpdate.pl
share_usage_with_koha_community.pl
sitemap.pl
staticfines.pl Bug 36787: staticfines.pl add use Koha::DateUtils::output_pref 2024-05-07 17:41:20 +02:00
stockrotation.pl
update_patrons_category.pl
update_totalissues.pl Bug 36137: Make update_totalissues cron always skip the holds queue 2024-05-03 18:02:15 +02:00
writeoff_debts.pl Bug 34077: Allow to use --category-code as the only filter option 2024-06-13 14:16:05 +01:00