diff --git a/authentik/admin/apps.py b/authentik/admin/apps.py index 82de9d5d30..28fa620eb6 100644 --- a/authentik/admin/apps.py +++ b/authentik/admin/apps.py @@ -3,6 +3,7 @@ from prometheus_client import Info from authentik.blueprints.apps import ManagedAppConfig +from authentik.lib.config import CONFIG from authentik.lib.utils.time import fqdn_rand from authentik.tasks.schedules.lib import ScheduleSpec @@ -41,5 +42,6 @@ class AuthentikAdminConfig(ManagedAppConfig): ScheduleSpec( actor=update_latest_version, crontab=f"{fqdn_rand('admin_latest_version')} * * * *", + paused=CONFIG.get_bool("disable_update_check"), ), ] diff --git a/authentik/outposts/apps.py b/authentik/outposts/apps.py index 0f9d99bc2c..10839cd8c1 100644 --- a/authentik/outposts/apps.py +++ b/authentik/outposts/apps.py @@ -83,5 +83,6 @@ class AuthentikOutpostConfig(ManagedAppConfig): actor=outpost_connection_discovery, crontab=f"{fqdn_rand('outpost_connection_discovery')} */8 * * *", run_on_startup=True, + paused=not CONFIG.get_bool("outposts.discover"), ), ] diff --git a/authentik/tasks/schedules/lib.py b/authentik/tasks/schedules/lib.py index 4881602aa7..62fe9e84b8 100644 --- a/authentik/tasks/schedules/lib.py +++ b/authentik/tasks/schedules/lib.py @@ -13,6 +13,7 @@ if TYPE_CHECKING: class ScheduleSpec: actor: Actor crontab: str + paused: bool = False uid: str | None = None args: Iterable[Any] = field(default_factory=tuple) @@ -50,6 +51,7 @@ class ScheduleSpec: defaults = { **query, "actor_name": self.actor.actor_name, + "paused": self.paused, "args": self.get_args(), "kwargs": self.get_kwargs(), "options": self.get_options(),