feat(cron): inherit agent timezone for default schedules

Make cron use the configured agent timezone when a cron expression omits tz or a one-shot ISO time has no offset. This keeps runtime context, heartbeat, and scheduling aligned around the same notion of time.

Made-with: Cursor
This commit is contained in:
Xubin Ren
2026-03-25 22:07:14 +08:00
committed by Xubin Ren
parent 13d6c0ae52
commit 4a7d7b8823
4 changed files with 67 additions and 14 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ class AgentLoop:
self.tools.register(MessageTool(send_callback=self.bus.publish_outbound))
self.tools.register(SpawnTool(manager=self.subagents))
if self.cron_service:
self.tools.register(CronTool(self.cron_service))
self.tools.register(CronTool(self.cron_service, default_timezone=timezone or "UTC"))
async def _connect_mcp(self) -> None:
"""Connect to configured MCP servers (one-time, lazy)."""