From 208eb63107e9621f66656e926c1a7ba06c171133 Mon Sep 17 00:00:00 2001 From: Adrienne Stilp Date: Fri, 9 Aug 2024 14:08:52 -0700 Subject: [PATCH 1/2] Send errors by email instead of redirecting to stdout --- gregor_apps.cron | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/gregor_apps.cron b/gregor_apps.cron index 1f8e1e7f..d1f27fc5 100644 --- a/gregor_apps.cron +++ b/gregor_apps.cron @@ -1,6 +1,9 @@ -# GREGOR_APPS crontab -# nightly except sunday at 00:00 -0 0 * * MON-SAT . /var/www/django/gregor_apps/gregor-apps-activate.sh; python manage.py run_anvil_audit --email gregorconsortium@uw.edu --errors-only >> cron.log 2>&1 +# GREGOR_APPS crontab - maintained in git gregor_apps.cron +# Send errors to gregorweb email +MAILTO="gregorweb@uw.edu" -# sunday night at 00:00 -0 0 * * SUN . /var/www/django/gregor_apps/gregor-apps-activate.sh; python manage.py run_anvil_audit --email gregorconsortium@uw.edu >> cron.log 2>&1 +# nightly except sunday at 02:00 +0 0 * * MON-SAT . /var/www/django/gregor_apps/gregor-apps-activate.sh; python manage.py run_anvil_audit --email gregorconsortium@uw.edu --errors-only >> cron.log + +# sunday night at 02:00 +0 0 * * SUN . /var/www/django/gregor_apps/gregor-apps-activate.sh; python manage.py run_anvil_audit --email gregorconsortium@uw.edu >> cron.log From 44b96ec22ea34fe6827c588fc81b6c2b8ac6240c Mon Sep 17 00:00:00 2001 From: Adrienne Stilp Date: Fri, 9 Aug 2024 14:10:22 -0700 Subject: [PATCH 2/2] Run audit at 2am instead of midnight We were getting some failures to send mail when the audit was being run at midnight on Sundays; perhaps trying the audit at a different time will fix the issue. --- gregor_apps.cron | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gregor_apps.cron b/gregor_apps.cron index d1f27fc5..06568713 100644 --- a/gregor_apps.cron +++ b/gregor_apps.cron @@ -3,7 +3,7 @@ MAILTO="gregorweb@uw.edu" # nightly except sunday at 02:00 -0 0 * * MON-SAT . /var/www/django/gregor_apps/gregor-apps-activate.sh; python manage.py run_anvil_audit --email gregorconsortium@uw.edu --errors-only >> cron.log +0 2 * * MON-SAT . /var/www/django/gregor_apps/gregor-apps-activate.sh; python manage.py run_anvil_audit --email gregorconsortium@uw.edu --errors-only >> cron.log # sunday night at 02:00 -0 0 * * SUN . /var/www/django/gregor_apps/gregor-apps-activate.sh; python manage.py run_anvil_audit --email gregorconsortium@uw.edu >> cron.log +0 2 * * SUN . /var/www/django/gregor_apps/gregor-apps-activate.sh; python manage.py run_anvil_audit --email gregorconsortium@uw.edu >> cron.log