[BUG] With several Schedule blocks, the next run is computed in the first block's timezone

Open Beginner friendly
#10,699 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
backend

Research direction

Start with calculateNextRunTime in apps/sim/background/schedule-execution.ts and trace how it selects the schedule block after a run. The issue says the job payload contains blockId, but the calculation uses the first starter or schedule block. Check the related schedule execution tests and add coverage for schedules in different timezones; done means each block's next run uses its own timezone.

Written by the indexing model from the issue text.

Description

Describe the bug
When a workflow has more than one Schedule block in different timezones, each schedule is advanced after a run using the first block's timezone.

To Reproduce

  1. Add Schedule A: daily 09:00, UTC.
  2. Add Schedule B: daily 09:00, Asia/Tokyo.
  3. Deploy. B's first next run is 00:00 UTC, which is correct.
  4. Let B run once. B's next run is now 09:00 UTC (18:00 in Tokyo).

Expected behavior
Each schedule keeps the timezone of its own block.

Additional context
calculateNextRunTime in apps/sim/background/schedule-execution.ts picks the first starter or schedule block and ignores the job payload's blockId.

Dominant language
TypeScript
Stars
29.8k
Forks
3.9k
Avg merge
1h 43m
Merged PRs (30d)
937

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from simstudioai/sim

All issues in simstudioai/sim

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.