diff --git a/README.md b/README.md index 45a9aa7..ae5eb6d 100644 --- a/README.md +++ b/README.md @@ -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. + +## 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). +