On 11/7/18 4:18 PM, Enrique Terrazas wrote:
Thank you Mark I don't think the periodic Django jobs are running. I do see the cron job executing the jobs as scheduled but I am seeing errors being sent to /var/spool/mail/mailman (thats the user that runs the MM3 application) that say: /bin/sh: django-admin: command not found
So whatever django-admin you are trying to run is not in the path of the cron job. Try an absolute path to django-admin instead.
If I run: django-admin --help
I get the following:
Note that only Django core commands are listed as settings are not properly configured (error: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.).
I install Mailman in a virtualenv and the django-admin file I run contains
#!/bin/bash . /opt/mailman/mm/venv/bin/activate cd /opt/mailman/mm export PYTHONPATH=/opt/mailman/mm export DJANGO_SETTINGS_MODULE=settings django-admin $@
The main things are the directory containing settings.py is /opt/mailman/mm and I export that as PYTHONPATH so my settings module can be found.