From 53e5791ada143b5194dcec6813ce1606325934e1 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 7 Feb 2020 10:34:41 -0500 Subject: [PATCH] LP1858448 Add external money aging script Adds a srfsh script which can be run via CRONTAB for aging billings and payments. Includes sample (commented) CRONTAB entry and note regarding data discarded as a result of aging. Signed-off-by: Bill Erickson --- Open-ILS/examples/crontab.example | 7 +++++++ Open-ILS/src/support-scripts/age-money.srfsh | 2 ++ 2 files changed, 9 insertions(+) create mode 100755 Open-ILS/src/support-scripts/age-money.srfsh diff --git a/Open-ILS/examples/crontab.example b/Open-ILS/examples/crontab.example index 30f62a5916..110adac93a 100644 --- a/Open-ILS/examples/crontab.example +++ b/Open-ILS/examples/crontab.example @@ -93,3 +93,10 @@ EG_BIN_DIR = /openils/bin # TODO: add other entries +# Run the money aging script. +# The Aging interval is defined within the script. Change to suit. +# NOTE: At time of writing, the money aging process discards certain +# billing and payment data. Use with caution. +# https://bugs.launchpad.net/evergreen/+bug/1858448 +#5 2 * * * . ~/.bashrc && $EG_BIN_DIR/age-money.srfsh + diff --git a/Open-ILS/src/support-scripts/age-money.srfsh b/Open-ILS/src/support-scripts/age-money.srfsh new file mode 100755 index 0000000000..ba4d887fae --- /dev/null +++ b/Open-ILS/src/support-scripts/age-money.srfsh @@ -0,0 +1,2 @@ +#!/openils/bin/srfsh +request open-ils.cstore open-ils.cstore.json_query {"from": ["money.age_billings_and_payments", "1 year"]} -- 2.11.0