From 567293b5a13de6ab4b3d0884f4c73b29173fd465 Mon Sep 17 00:00:00 2001 From: nanoy Date: Thu, 20 Feb 2020 11:26:36 +0100 Subject: [PATCH] Add cron example to README --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) 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). +