Add cron example to README

This commit is contained in:
nanoy 2020-02-20 11:26:36 +01:00 committed by root
parent 5c00e9c3ae
commit 567293b5a1

View file

@ -72,3 +72,14 @@ list_name = rezo-admin
``` ```
3 mailings are generated : one which is adherents@rezometz.org with all adherents, one which is is rezo@rezometz.org with the group rezo and the last one is rezo-admin@rezometz.org with the group rezotage. 3 mailings are generated : one which is adherents@rezometz.org with all adherents, one which is is rezo@rezometz.org with the group rezo and the last one is rezo-admin@rezometz.org with the group rezotage.
## Setup with a cron
You can setup an automatic regeneration with, for instance, the following command :
```
* */2 * * * root python3 /usr/local/mailing/main.py; python3 /usr/local/mailing/sync_adherents_mailman.py
```
in `/etc/cron.d/mailing`. The two scripts are executed every two hours in this case (to limit the number of requests on mailman api even if the second script is executed only if the first regenerates files).