[BUG] Weekly schedule set to Sunday runs on Monday

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
91/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
backend

Research direction

Start with getScheduleTimeValues in apps/sim/lib/workflows/schedules/utils.ts and check how it handles Sunday, whose mapped value is 0. Confirm the deployed schedule uses the Sunday cron expression 0 9 * * 0; done means Sunday remains Sunday instead of falling back to Monday.

Written by the indexing model from the issue text.

Description

Describe the bug
A Schedule block set to Weekly / Sunday is deployed as a Monday schedule.

To Reproduce

  1. Add a Schedule block.
  2. Set run frequency to Weekly, day of week to Sunday, time to 09:00.
  3. Deploy and check the next run.

Expected behavior
The next run is the coming Sunday (0 9 * * 0). It is Monday (0 9 * * 1).

Additional context
getScheduleTimeValues in apps/sim/lib/workflows/schedules/utils.ts uses DAY_MAP[weeklyDayStr] || 1, and Sunday maps to 0.

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.