diff --git a/src/pretix/base/management/commands/runperiodic.py b/src/pretix/base/management/commands/runperiodic.py index a6ff0b035a..3981262984 100644 --- a/src/pretix/base/management/commands/runperiodic.py +++ b/src/pretix/base/management/commands/runperiodic.py @@ -36,6 +36,7 @@ import time import traceback from django.conf import settings +from django.core.cache import cache from django.core.management.base import BaseCommand from django.dispatch.dispatcher import NO_RECEIVERS @@ -57,6 +58,8 @@ class Command(BaseCommand): def handle(self, *args, **options): verbosity = int(options['verbosity']) + cache.set("pretix_runperiodic_executed", True, 3600 * 12) + if not periodic_task.receivers or periodic_task.sender_receivers_cache.get(self) is NO_RECEIVERS: return diff --git a/src/pretix/control/context.py b/src/pretix/control/context.py index 13eb1d2054..3cdfc1b0bf 100644 --- a/src/pretix/control/context.py +++ b/src/pretix/control/context.py @@ -36,6 +36,7 @@ import sys from importlib import import_module from django.conf import settings +from django.core.cache import cache from django.db.models import Q from django.urls import Resolver404, get_script_prefix, resolve from django.utils.translation import get_language @@ -152,6 +153,8 @@ def _default_context(request): ctx['warning_update_available'] = True if not gs.settings.update_check_ack and 'runserver' not in sys.argv: ctx['warning_update_check_active'] = True + if not cache.get('pretix_runperiodic_executed') and not settings.DEBUG: + ctx['warning_cronjob'] = True ctx['ie_deprecation_warning'] = 'MSIE' in request.headers.get('User-Agent', '') or 'Trident/' in request.headers.get('User-Agent', '') diff --git a/src/pretix/control/templates/pretixcontrol/base.html b/src/pretix/control/templates/pretixcontrol/base.html index df9806feed..65c4a9235e 100644 --- a/src/pretix/control/templates/pretixcontrol/base.html +++ b/src/pretix/control/templates/pretixcontrol/base.html @@ -421,6 +421,14 @@ {% endif %} + {% if warning_cronjob %} +