LP1858448 Add external money aging script
authorBill Erickson <berickxx@gmail.com>
Fri, 7 Feb 2020 15:34:41 +0000 (10:34 -0500)
committerBill Erickson <berickxx@gmail.com>
Fri, 7 Feb 2020 15:35:00 +0000 (10:35 -0500)
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 <berickxx@gmail.com>
Open-ILS/examples/crontab.example
Open-ILS/src/support-scripts/age-money.srfsh [new file with mode: 0755]

index 30f62a5..110adac 100644 (file)
@@ -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 (executable)
index 0000000..ba4d887
--- /dev/null
@@ -0,0 +1,2 @@
+#!/openils/bin/srfsh
+request open-ils.cstore open-ils.cstore.json_query {"from": ["money.age_billings_and_payments", "1 year"]}