Processing math: 100%
First time here? Check out the FAQ!
0

What permissions/environment setting are needed to run the send_email_alerts?
 

The documentation is kind of light on this and I ran into problems with "environment variable DJANGO_SETTINGS_MODULE is undefined"

http://askbot.org/doc/management-commands.html

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
updated 14 years ago
tfoote's avatar
161
tfoote
asked 14 years ago

Comments

see more comments

1 Answer

0

The reason you get that error is that the settings.py file is not on on the python path when the script is executed.

There is a sample job file askbot/cron/askbot_cron_job, where PYTHONPATH is modified.

I've relabeled your post as "bug" because the deployment command must ideally configure those jobs automatically.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 14 years ago
link

Comments

Thanks I ended up using the following: """PROJECT_PARENT_DIR=/var/www export PYTHONPATH=PROJECTPARENTDIR:PYTHONPATH #these are actual commands that are to be run python $PROJECT_PARENT_DIR/manage.py send_email_alerts """
tfoote's avatar tfoote (14 years ago)
good. the reason the comment formatting is off is that the two $ signs initiate mathjax rendering. I think if you back-slash escape them the problem should go away. Otherwise, there is no easy fix at this time.
Evgeny's avatar Evgeny (14 years ago)
see more comments