misc: use uwsgi to run cron tasks (#50018)

This commit is contained in:
Lauréline Guérin 2021-01-18 15:34:46 +01:00
parent 0be39c99f9
commit 22c2c8e40b
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
4 changed files with 12 additions and 13 deletions

View File

@ -1,5 +0,0 @@
MAILTO=root
0 0 1 1 * chrono /usr/bin/chrono-manage tenant_command sync_desks_timeperiod_exceptions_from_settings --all-tenants -v0
*/5 * * * * chrono /usr/bin/chrono-manage tenant_command cancel_events --all-tenants -v0
*/5 * * * * chrono /usr/bin/chrono-manage tenant_command send_email_notifications --all-tenants -v0

View File

@ -1,3 +0,0 @@
#! /bin/sh
/sbin/runuser -u chrono /usr/bin/chrono-manage -- tenant_command anonymize_bookings --all-tenants

View File

@ -1,5 +0,0 @@
#! /bin/sh
/sbin/runuser -u chrono /usr/bin/chrono-manage -- tenant_command clearsessions --all-tenants
/sbin/runuser -u chrono /usr/bin/chrono-manage -- tenant_command sync_desks_timeperiod_exceptions --all-tenants
/sbin/runuser -u chrono /usr/bin/chrono-manage -- tenant_command send_booking_reminders --all-tenants

12
debian/uwsgi.ini vendored
View File

@ -12,6 +12,18 @@ http-socket = /run/chrono/chrono.sock
chmod-socket = 666
vacuum = true
# every five minutes
cron = -5 -1 -1 -1 -1 /usr/bin/chrono-manage tenant_command cancel_events --all-tenants -v0
cron = -5 -1 -1 -1 -1 /usr/bin/chrono-manage tenant_command send_email_notifications --all-tenants -v0
# hourly
cron = 1 -1 -1 -1 -1 /usr/bin/chrono-manage tenant_command clearsessions --all-tenants
cron = 1 -1 -1 -1 -1 /usr/bin/chrono-manage tenant_command send_booking_reminders --all-tenants
cron = 1 -1 -1 -1 -1 /usr/bin/chrono-manage tenant_command sync_desks_timeperiod_exceptions --all-tenants
# daily
cron = 2 4 -1 -1 -1 /usr/bin/chrono-manage tenant_command anonymize_bookings --all-tenant
# every 01/01 at 1:1
cron = 1 1 1 1 -1 /usr/bin/chrono-manage tenant_command sync_desks_timeperiod_exceptions_from_settings --all-tenants -v0
master = true
enable-threads = true
harakiri = 120