agent-orchestrator icon indicating copy to clipboard operation
agent-orchestrator copied to clipboard

bug(automations): timezone-only edits retain the previous execution schedule

Open codebanditssss opened this issue 1 month ago • 1 comments

Changing only an automation's timezone can update the timezone field without changing when it will run.

Repro

  1. Create a disabled automation with cron 0 9 * * * and timezone UTC.
  2. PATCH /api/v1/automations/<id> with:
    {"timezone":"America/New_York"}
    
  3. Check timezone and nextRunAt in the response.

The timezone becomes America/New_York, but the next run stays at 2026-10-07T09:00:00Z. It should move to 2026-10-07T13:00:00Z, which is 09:00 in New York that day.

Sending the same cron along with the new timezone gives the correct result. Changing between two named timezones can instead return a timezone-conflict error.

The update path reuses the old RRULE, including its old timezone anchor.

Test notes: Fedora 44, dd67f2d818, tested through the real daemon API on 2026-10-06. The automation stayed disabled; this verifies the calculated schedule, not an executed run.

codebanditssss avatar Oct 06 '26 18:10 codebanditssss

Assigned to @ApexYash11

Rishet11 avatar Oct 06 '26 19:10 Rishet11