diff --git a/gregor-apps-activate.sh b/gregor-apps-activate.sh new file mode 100644 index 00000000..efa72f9c --- /dev/null +++ b/gregor-apps-activate.sh @@ -0,0 +1,7 @@ +export DJANGO_SITE_DIR=/var/www/django/gregor_apps/ +export DJANGO_SITE_USER=gregorweb +export DJANGO_SETTINGS_MODULE=config.settings.apps +export DJANGO_WSGI_FILE=config/gregor_apps_wsgi.py +export GAC_ENV=gregor_apps +cd $DJANGO_SITE_DIR +. venv/bin/activate diff --git a/gregor-apps-dev-activate.sh b/gregor-apps-dev-activate.sh new file mode 100644 index 00000000..40779e73 --- /dev/null +++ b/gregor-apps-dev-activate.sh @@ -0,0 +1,11 @@ +# Sets environment variables, changes directory and activates venv +# for gregor apps dev env +# Used by crontab, validate any changes + +export DJANGO_SITE_DIR=/var/www/django/gregor_apps_dev/ +export DJANGO_SITE_USER=gregorweb +export DJANGO_SETTINGS_MODULE=config.settings.apps_dev +export DJANGO_WSGI_FILE=config/apps_dev_wsgi.py +export GAC_ENV=gregor_apps_dev +cd $DJANGO_SITE_DIR +. venv/bin/activate diff --git a/gregor_apps.cron b/gregor_apps.cron new file mode 100644 index 00000000..1f8e1e7f --- /dev/null +++ b/gregor_apps.cron @@ -0,0 +1,6 @@ +# 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 + +# 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 diff --git a/gregor_apps_dev.cron b/gregor_apps_dev.cron new file mode 100644 index 00000000..557293d1 --- /dev/null +++ b/gregor_apps_dev.cron @@ -0,0 +1,7 @@ +# GREGOR_APPS_DEV crontab - disabled by default +# can be enabled for testing. +# nightly except sunday at 00:00 +# 0 0 * * MON-SAT . /var/www/django/gregor_apps/gregor-apps-dev-activate.sh; python manage.py run_anvil_audit --email gregorconsortium@uw.edu --errors-only >> cron.log 2>&1 + +# sunday night at 00:00 +# 0 0 * * SUN . /var/www/django/gregor_apps/gregor-apps-dev-activate.sh; python manage.py run_anvil_audit --email gregorconsortium@uw.edu >> cron.log 2>&1