The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(cron): keep the cronjob tool schema net-small for per-job timezone
Teknium4e1a4df66339
diff --git a/tests/tools/test_cronjob_tools.py b/tests/tools/test_cronjob_tools.pyindex 8e48ef0dd1e..c34649ecf58 100644--- a/tests/tools/test_cronjob_tools.py+++ b/tests/tools/test_cronjob_tools.py@@ -4,7 +4,6 @@ import jsonimport pytestfrom tools.cronjob_tools import (- CRONJOB_SCHEMA,_scan_cron_prompt,check_cronjob_requirements,cronjob,@@ -852,13 +851,6 @@ class TestScheduleKnobToolSurface:assert "timezone" not in job, "'' clears the pin; the key is dropped"assert "grace_minutes" not in job- def test_grace_schema_accepts_a_string_so_the_model_can_clear_it(self):- """``''`` means "restore the computed window"; an integer-only schema would leave the- model no way to express it (the sanitizer normalizes ``type: [...]`` per provider)."""- prop = CRONJOB_SCHEMA["parameters"]["properties"]["grace_minutes"]- assert "string" in prop["type"] and "integer" in prop["type"]- assert "''" in prop["description"]-def test_grace_on_a_non_cron_schedule_is_an_error(self):created = json.loads(cronjob(action="create", prompt="x", schedule="every 2h", grace_minutes=30))diff --git a/tools/cronjob_tools.py b/tools/cronjob_tools.pyindex a899a85408d..2197f72c190 100644--- a/tools/cronjob_tools.py+++ b/tools/cronjob_tools.py@@ -1188,11 +1188,7 @@ Jobs run in a fresh session with no current-chat context, so prompts must be sel},"timezone": {"type": "string",- "description": "Optional IANA timezone for the job's schedule, e.g. 'Asia/Hong_Kong' or 'America/New_York': the cron expression is then read as THIS zone's wall clock, whatever the profile's own timezone is. Use it for a job that must fire at a fixed local time in another market. Omit to inherit the profile timezone. On update, '' clears the pin."- },- "grace_minutes": {- "type": ["integer", "string"],- "description": "Optional catch-up window override for a cron job, in minutes (0-1440). The default is half the job's period, clamped to 2-120 minutes. 0 means never catch up: a missed occurrence is skipped instead of being run late. Cron schedules only. On update, '' (empty string) restores the computed window."+ "description": "Optional IANA zone (e.g. 'America/New_York') the cron expression is read in, instead of the profile's. On update, '' clears."},"attach_to_session": {"type": "boolean",