mailman-suite scheduled tasks
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? Best Regards,Eric
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>
Thanks Morris!Since I included it in the crontab of the mailman user I could leave out the user: @hourly /opt/mailman/venv/bin/django-admin runjobs hourly --pythonpath /opt/mailman/mailman-suite/mailman-suite_project --settings settings
Clear skies!Eric On Saturday, December 5, 2020, 11:39:41 PM GMT+1, Morris Jones <mojo@whiteoaks.com> wrote:
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>
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
participants (2)
-
Eric Broens
-
Morris Jones