summaryrefslogtreecommitdiff
path: root/sbhs_server
diff options
context:
space:
mode:
authorcoderick142017-05-24 14:08:52 +0530
committercoderick142017-05-24 14:08:52 +0530
commitd5b5a4a5af947b32c9b517a1ac3711dc78929e35 (patch)
tree1f5d284f8d3f9e4ff509911fcbbe6b16f265edd5 /sbhs_server
parent9a1614dfa9cd3df20710a2c36ee07ec8a988588b (diff)
downloadSBHS-2018-Rpi-d5b5a4a5af947b32c9b517a1ac3711dc78929e35.tar.gz
SBHS-2018-Rpi-d5b5a4a5af947b32c9b517a1ac3711dc78929e35.tar.bz2
SBHS-2018-Rpi-d5b5a4a5af947b32c9b517a1ac3711dc78929e35.zip
Add cron module
Diffstat (limited to 'sbhs_server')
-rw-r--r--sbhs_server/settings.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/sbhs_server/settings.py b/sbhs_server/settings.py
index 15dc8ae..7161f29 100644
--- a/sbhs_server/settings.py
+++ b/sbhs_server/settings.py
@@ -63,6 +63,7 @@ INSTALLED_APPS = (
#'yaksh',
'taggit',
#'corsheaders'
+ 'django_crontab',
'account',
'myadmin',
@@ -184,6 +185,10 @@ TEMPLATES = [
},
]
+CRONJOBS = [
+ ('2 * * * *', 'maintenance.health_monitor.main', '>> /tmp/health_monitor.log'),
+]
+
import warnings
warnings.filterwarnings(
'ignore', r"DateTimeField .* received a naive datetime",
@@ -270,6 +275,6 @@ print "No of machines online : ", len(online_mids)
import sys
print >>sys.stderr, online_mids[1:33] #srikant
#srikant
-#f = open('/tmp/online_mids', 'w')
+#f = open(os.path.join(BASE_DIR, 'maintenance/online_mids.txt'), 'w')
#f.write(online_mids)
#f.close()