diff --git a/nonebot/__init__.py b/nonebot/__init__.py index 4b606b8f..949c0f5f 100644 --- a/nonebot/__init__.py +++ b/nonebot/__init__.py @@ -78,7 +78,7 @@ def init(config_object: Optional[Any] = None) -> None: _bot.server_app.before_serving(_start_scheduler) -def _start_scheduler(): +async def _start_scheduler(): if scheduler and not scheduler.running: scheduler.configure(_bot.config.APSCHEDULER_CONFIG) scheduler.start()