Add cron example to README
This commit is contained in:
parent
5c00e9c3ae
commit
567293b5a1
1 changed files with 11 additions and 0 deletions
11
README.md
11
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.
|
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).
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue