async def initialize(self):
        """Initialize and schedule maintenance tasks from configuration"""
        logger.info("Initializing database maintenance service")
        await self.providers.scheduler.start()

        maintenance_config = self.config.database.maintenance

        # Parse the cron schedule
        schedule_parts = self._parse_cron_schedule(
            maintenance_config.vacuum_schedule
        )

        # Schedule the vacuum job
        job = await self.providers.scheduler.add_job(
            self.vacuum_database,
            trigger="cron",
            **schedule_parts,
            kwargs={
                "full": maintenance_config.vacuum_full,
                "analyze": maintenance_config.vacuum_analyze,
            },
        )

        self.scheduled_jobs.append(job)
Initialize and schedule maintenance tasks from configuration
py/core/main/services/maintenance_service.py