summaryrefslogtreecommitdiffstats
path: root/forum/cron
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-04-24 19:11:05 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-04-24 19:11:05 -0400
commit3b8821b7e6c00a34fe71b22f011841786bb9d7e5 (patch)
treed0216d50ede25086efe89aa41e9a4aeac07b1094 /forum/cron
parent9dac785a3416e3472a69155247ad5d5af58636db (diff)
downloadaskbot-3b8821b7e6c00a34fe71b22f011841786bb9d7e5.tar.gz
askbot-3b8821b7e6c00a34fe71b22f011841786bb9d7e5.tar.bz2
askbot-3b8821b7e6c00a34fe71b22f011841786bb9d7e5.zip
moved some files and directories inside forum from root
Diffstat (limited to 'forum/cron')
-rw-r--r--forum/cron/README5
-rwxr-xr-xforum/cron/multi_award_badges5
-rwxr-xr-xforum/cron/multi_award_badges_virtualenv10
-rwxr-xr-xforum/cron/once_award_badges14
-rwxr-xr-xforum/cron/once_award_badges_virtualenv10
-rw-r--r--forum/cron/send_email_alerts5
-rw-r--r--forum/cron/send_email_alerts_virtualenv10
7 files changed, 59 insertions, 0 deletions
diff --git a/forum/cron/README b/forum/cron/README
new file mode 100644
index 00000000..d5573150
--- /dev/null
+++ b/forum/cron/README
@@ -0,0 +1,5 @@
+this directory contains sample commands to be executed
+by cron
+
+files with names ending "virtuanenv" should work under Python virtualenv system
+other files - with standard unix setup
diff --git a/forum/cron/multi_award_badges b/forum/cron/multi_award_badges
new file mode 100755
index 00000000..3d768772
--- /dev/null
+++ b/forum/cron/multi_award_badges
@@ -0,0 +1,5 @@
+#!/bin/sh
+PYTHONPATH=/path/to/dir_above_askbot_site
+export PYTHONPATH
+PROJECT_ROOT=$PYTHONPATH/askbot_site
+python manage.py multi_award_badges >> $PROJECT_ROOT/log/cron_badges.log 2>&1
diff --git a/forum/cron/multi_award_badges_virtualenv b/forum/cron/multi_award_badges_virtualenv
new file mode 100755
index 00000000..4230fb22
--- /dev/null
+++ b/forum/cron/multi_award_badges_virtualenv
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+WORKON_HOME=~/envs/askbot
+PROJECT_ROOT=~/webapps/askbot_server/projects/askbot/
+
+# activate virtual environment
+. $WORKON_HOME/bin/activate
+
+cd $PROJECT_ROOT
+python manage.py multi_award_badges >> $PROJECT_ROOT/log/cron_badges.log 2>&1
diff --git a/forum/cron/once_award_badges b/forum/cron/once_award_badges
new file mode 100755
index 00000000..069656ca
--- /dev/null
+++ b/forum/cron/once_award_badges
@@ -0,0 +1,14 @@
+#!/bin/sh
+PYTHONPATH=/path/to/dir_above_askbot_site
+export PYTHONPATH
+PROJECT_ROOT=$PYTHONPATH/askbot_site
+python manage.py once_award_badges >> $PROJECT_ROOT/log/cron_badges.log 2>&1
+
+
+#!/bin/sh
+PYTHONPATH=/usr/local/sites/askbot_production
+export PYTHONPATH
+PROJECT_ROOT=$PYTHONPATH/robofaqs
+python $PROJECT_ROOT/manage.py once_award_badges >> $PROJECT_ROOT/log/cron_badges.log 2>&1
+python $PROJECT_ROOT/manage.py multi_award_badges >> $PROJECT_ROOT/log/cron_badges.log 2>&1
+python $PROJECT_ROOT/manage.py send_email_alerts >> $PROJECT_ROOT/log/cron_email.log 2>&1 \ No newline at end of file
diff --git a/forum/cron/once_award_badges_virtualenv b/forum/cron/once_award_badges_virtualenv
new file mode 100755
index 00000000..0011981c
--- /dev/null
+++ b/forum/cron/once_award_badges_virtualenv
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+WORKON_HOME=~/envs/askbot
+PROJECT_ROOT=~/webapps/askbot_server/projects/askbot/
+
+# activate virtual environment
+. $WORKON_HOME/bin/activate
+
+cd $PROJECT_ROOT
+python manage.py once_award_badges >> $PROJECT_ROOT/log/cron_badges.log 2>&1
diff --git a/forum/cron/send_email_alerts b/forum/cron/send_email_alerts
new file mode 100644
index 00000000..7581a88c
--- /dev/null
+++ b/forum/cron/send_email_alerts
@@ -0,0 +1,5 @@
+#!/bin/sh
+PYTHONPATH=/path/to/dir_above_askbot_site
+export PYTHONPATH
+PROJECT_ROOT=$PYTHONPATH/askbot_site
+/path/to/python $PROJECT_ROOT/manage.py send_email_alerts
diff --git a/forum/cron/send_email_alerts_virtualenv b/forum/cron/send_email_alerts_virtualenv
new file mode 100644
index 00000000..2f1b64d0
--- /dev/null
+++ b/forum/cron/send_email_alerts_virtualenv
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+WORKON_HOME=~/envs/askbot
+PROJECT_ROOT=~/webapps/askbot_server/projects/askbot/
+
+# activate virtual environment
+. $WORKON_HOME/bin/activate
+
+cd $PROJECT_ROOT
+python manage.py send_email_alerts >> $PROJECT_ROOT/log/cron_mail.log 2>&1