diff --git a/nanobot/cron/service.py b/nanobot/cron/service.py index d60846640..42b0e097e 100644 --- a/nanobot/cron/service.py +++ b/nanobot/cron/service.py @@ -84,6 +84,7 @@ class CronService: if mtime != self._last_mtime: logger.info("Cron: jobs.json modified externally, reloading") self._store = None + self._last_mtime = mtime if self._store: return self._store @@ -190,8 +191,7 @@ class CronService: } self.store_path.write_text(json.dumps(data, indent=2, ensure_ascii=False), encoding="utf-8") - self._last_mtime = self.store_path.stat().st_mtime - + async def start(self) -> None: """Start the cron service.""" self._running = True