diff --git a/src/agents/tools/cron-tool.ts b/src/agents/tools/cron-tool.ts index 2976dee3924..b40211dabec 100644 --- a/src/agents/tools/cron-tool.ts +++ b/src/agents/tools/cron-tool.ts @@ -252,9 +252,10 @@ SCHEDULE TYPES (schedule.kind): - "every": Recurring interval { "kind": "every", "everyMs": , "anchorMs": } - "cron": Cron expression - { "kind": "cron", "expr": "", "tz": "" } + { "kind": "cron", "expr": "", "tz": "" } + When tz is omitted, cron expressions are evaluated in the Gateway's local system timezone (NOT UTC). -ISO timestamps without an explicit timezone are treated as UTC. +ISO timestamps (schedule.kind="at") without an explicit timezone offset are treated as UTC. PAYLOAD TYPES (payload.kind): - "systemEvent": Injects text as system event into session diff --git a/src/cli/cron-cli/register.cron-add.ts b/src/cli/cron-cli/register.cron-add.ts index e916c459863..5640f2185a8 100644 --- a/src/cli/cron-cli/register.cron-add.ts +++ b/src/cli/cron-cli/register.cron-add.ts @@ -76,7 +76,11 @@ export function registerCronAddCommand(cron: Command) { .option("--at ", "Run once at time (ISO) or +duration (e.g. 20m)") .option("--every ", "Run every duration (e.g. 10m, 1h)") .option("--cron ", "Cron expression (5-field or 6-field with seconds)") - .option("--tz ", "Timezone for cron expressions (IANA)", "") + .option( + "--tz ", + "Timezone for cron expressions (IANA, defaults to system local timezone)", + "", + ) .option("--stagger ", "Cron stagger window (e.g. 30s, 5m)") .option("--exact", "Disable cron staggering (set stagger to 0)", false) .option("--system-event ", "System event payload (main session)") diff --git a/src/cli/cron-cli/register.cron-edit.ts b/src/cli/cron-cli/register.cron-edit.ts index b2007fc3f1a..7fd5d9ccb11 100644 --- a/src/cli/cron-cli/register.cron-edit.ts +++ b/src/cli/cron-cli/register.cron-edit.ts @@ -44,7 +44,10 @@ export function registerCronEditCommand(cron: Command) { .option("--at ", "Set one-shot time (ISO) or duration like 20m") .option("--every ", "Set interval duration like 10m") .option("--cron ", "Set cron expression") - .option("--tz ", "Timezone for cron expressions (IANA)") + .option( + "--tz ", + "Timezone for cron expressions (IANA, defaults to system local timezone)", + ) .option("--stagger ", "Cron stagger window (e.g. 30s, 5m)") .option("--exact", "Disable cron staggering (set stagger to 0)") .option("--system-event ", "Set systemEvent payload")