summaryrefslogtreecommitdiff
path: root/new_cron_job.sh
diff options
context:
space:
mode:
authordk-152017-05-26 00:01:35 +0530
committerdk-152017-05-26 00:01:35 +0530
commit6ef013505cd0f28a2ae4a98948fb1913e7f2898c (patch)
tree3ed15f10269054d10860cafb4b03df80722bf58a /new_cron_job.sh
parent1fa3368b4662163e6652d5524a0c75bd836705f9 (diff)
downloadSBHS-2018-Rpi-6ef013505cd0f28a2ae4a98948fb1913e7f2898c.tar.gz
SBHS-2018-Rpi-6ef013505cd0f28a2ae4a98948fb1913e7f2898c.tar.bz2
SBHS-2018-Rpi-6ef013505cd0f28a2ae4a98948fb1913e7f2898c.zip
Add new_cron_job.sh for django 1.11 and include log_generator in maintenance management
Diffstat (limited to 'new_cron_job.sh')
-rw-r--r--new_cron_job.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/new_cron_job.sh b/new_cron_job.sh
new file mode 100644
index 0000000..f757e20
--- /dev/null
+++ b/new_cron_job.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# Django 1.11 compatible
+
+
+find $(pwd) -iname \*.pyc -exec rm -rfv {} \; #to delete all .pyc files
+
+DIR="$( cd "$( dirname "$0" )" && pwd )"
+cd $DIR
+killall streamer
+source ../bin/activate
+#source ./bin/activate
+python sbhs_server/scan_machines.py
+#python offline_reconnect.py
+python manage.py makemigrations
+python manage.py migrate
+python manage.py initialize_machines
+python manage.py generate_checksum
+touch index.wsgi
+python manage.py log_generator
+
+#python log_generator.py
+date > date.txt
+sleep 2 \ No newline at end of file