On 12/5/2020 2:12 PM, Eric Broens via Mailman-users wrote:
Hi, The documentation https://docs.mailman3.org/en/latest/config-web.html includes a section on scheduled tasks that need to be included in cron. "runjobs" seems to be available only from "manage.py". Do these scheduled tasks need to be executed from the python virtual environment?If so, is there a way to do that directly from cron, or should I create a script for these tasks which can be called from by cron?
Eric, here's an example from my mailman crontab. By calling the django-admin instance from the virtual env, it gets picked up automatically:
@hourly mailman /opt/mailman/venv/bin/django-admin runjobs hourly --pythonpath /opt/mailman/mailman-suite/mailman-suite_project --settings settings
(Hopefully the line wrap won't munge the line too badly.)
Mojo
Morris Jones, Monrovia, CA BridgeMojo <http://bridgemojo.com> Old Town Sidewalk Astronomers <http://otastro.org> Mojo's Blog <http://mojo.whiteoaks.com>