diff options
Diffstat (limited to 'forum/cron')
-rw-r--r-- | forum/cron/README | 5 | ||||
-rwxr-xr-x | forum/cron/multi_award_badges | 5 | ||||
-rwxr-xr-x | forum/cron/multi_award_badges_virtualenv | 10 | ||||
-rwxr-xr-x | forum/cron/once_award_badges | 14 | ||||
-rwxr-xr-x | forum/cron/once_award_badges_virtualenv | 10 | ||||
-rw-r--r-- | forum/cron/send_email_alerts | 5 | ||||
-rw-r--r-- | forum/cron/send_email_alerts_virtualenv | 10 |
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 |