1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-24 18:22:24 +00:00

Use a cron to send mails

This commit is contained in:
Yohann D'ANELLO 2020-09-19 21:31:28 +02:00
parent d414f1a920
commit f6c209df03
2 changed files with 7 additions and 0 deletions

View File

@ -20,6 +20,8 @@ RUN ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/
RUN ln -sf /code/nginx_tfjm.conf /etc/nginx/conf.d/tfjm.conf
RUN rm /etc/nginx/conf.d/default.conf
RUN cp /code/tfjm.cron /etc/crontabs/tfjm
# With a bashrc, the shell is better
RUN ln -s /code/.bashrc /root/.bashrc

5
tfjm.cron Normal file
View File

@ -0,0 +1,5 @@
# m h dom mon dow user command
# Envoyer les mails en attente
* * * * * root cd /code && python manage.py send_mail -c 1
* * * * * root cd /code && python manage.py retry_deferred -c 1
00 0 * * * root cd /code && python manage.py purge_mail_log 7 -c 1