From 154549e34b85b03d3eb53ef2f419d904709e25c1 Mon Sep 17 00:00:00 2001 From: Amit Upreti Date: Mon, 13 Mar 2023 16:06:12 -0400 Subject: [PATCH] add cronjob to run management command Like other cron job, the idea here is that we dont want to overwhelm the resources so the cron jobs will run everyhour for a small number of applications --- deploy/production/etc/cron.d/physionet | 3 +++ deploy/staging/etc/cron.d/physionet | 3 +++ 2 files changed, 6 insertions(+) diff --git a/deploy/production/etc/cron.d/physionet b/deploy/production/etc/cron.d/physionet index 038be1d97a..944275ac07 100644 --- a/deploy/production/etc/cron.d/physionet +++ b/deploy/production/etc/cron.d/physionet @@ -16,3 +16,6 @@ # auto reject pending credentialing applications in case the references don't respond 0 */1 * * * www-data env DJANGO_SETTINGS_MODULE=physionet.settings.production /physionet/python-env/physionet/bin/python3 /physionet/physionet-build/physionet-django/manage.py reject_pending_credentialing_applications + +# auto reject pending registration applications for events after the event end date +0 */1 * * * www-data env DJANGO_SETTINGS_MODULE=physionet.settings.production /physionet/python-env/physionet/bin/python3 /physionet/physionet-build/physionet-django/manage.py reject_past_event_applications diff --git a/deploy/staging/etc/cron.d/physionet b/deploy/staging/etc/cron.d/physionet index affcf0d1c4..48b7502e49 100644 --- a/deploy/staging/etc/cron.d/physionet +++ b/deploy/staging/etc/cron.d/physionet @@ -16,3 +16,6 @@ # auto reject pending credentialing applications in case the references don't respond 0 */1 * * * www-data env DJANGO_SETTINGS_MODULE=physionet.settings.staging /physionet/python-env/physionet/bin/python3 /physionet/physionet-build/physionet-django/manage.py reject_pending_credentialing_applications + +# auto reject pending registration applications for events after the event end date +0 */1 * * * www-data env DJANGO_SETTINGS_MODULE=physionet.settings.production /physionet/python-env/physionet/bin/python3 /physionet/physionet-build/physionet-django/manage.py reject_past_event_applications