Add a purge_holds.srfsh script so it can be run from cron.
authorJason Stephenson <jstephenson@mvlc.org>
Mon, 1 Apr 2013 20:59:59 +0000 (16:59 -0400)
committerDan Wells <dbw2@calvin.edu>
Fri, 7 Jun 2013 19:23:21 +0000 (15:23 -0400)
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/Makefile.am
Open-ILS/src/support-scripts/purge_holds.srfsh [new file with mode: 0755]

index 0363c4b..d96d1bd 100644 (file)
@@ -72,6 +72,7 @@ core_scripts =   $(examples)/oils_ctl.sh \
                 $(supportscr)/thaw_expired_frozen_holds.srfsh \
                 $(supportscr)/long-overdue-status-update.pl \
                 $(supportscr)/action_trigger_runner.pl \
+                $(supportscr)/purge_holds.srfsh \
                 $(srcdir)/extras/eg_config \
                 $(srcdir)/extras/openurl_map.pl \
                 $(srcdir)/extras/import/marc_add_ids
diff --git a/Open-ILS/src/support-scripts/purge_holds.srfsh b/Open-ILS/src/support-scripts/purge_holds.srfsh
new file mode 100755 (executable)
index 0000000..bce78e2
--- /dev/null
@@ -0,0 +1,7 @@
+#!/openils/bin/srfsh
+open open-ils.cstore
+request open-ils.cstore open-ils.cstore.transaction.begin
+request open-ils.cstore open-ils.cstore.json_query {"from":["action.purge_holds"]}
+request open-ils.cstore open-ils.cstore.transaction.commit
+close open-ils.cstore
+