summaryrefslogtreecommitdiff
path: root/run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'run.sh')
-rwxr-xr-xrun.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/run.sh b/run.sh
new file mode 100755
index 0000000..2698660
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+set -e
+pushd $(dirname $0) > /dev/null
+
+if [ "$1" == "--no-cache" ]
+then
+ rm -f *cache*.sqlite
+fi
+
+set -o allexport
+source .env
+set +o allexport
+
+DATE=`date +%Y-%m-%d`
+OUTPUT_FILE=output/bbo_finder-$DATE.txt
+python bbo_finder.py 14 $DATE 2>>bbo_finder.log > ${OUTPUT_FILE}
+
+if [ -s ${OUTPUT_FILE} ]
+then
+ cat ${OUTPUT_FILE}
+ /root/bin/join-notify.sh "BBO finder returned data" > /dev/null 2>&1
+fi
+
+popd > /dev/null