temporalio / temporalio/temporal

Schedule "StartAt" not used when calculating intervals?

Open
#6,173 0 comments 1 reaction 1 assignee View on GitHub

@chaptersix is already working on this.

Since Aug 13, 2026.

potential-bug
Dominant language
Go
Stars
23.2k
Forks
1.9k
Avg merge
2d 8h
Merged PRs (30d)
228

Description

Today is June 19th, 2024. If you create a schedule and specify "every 365 days" the result will be that the first run is on 2024-12-18 00:00:00. That's in 6 months. I've tried passing StartAt: 2025-06-19 but I get 2025-12-18 00:00:00 as a result.

I understand this may be known and as-designed behavior but it struck me as unexpected to ask for a 365 day interval, yet the first run is within the next 6 months.

I also don't see any way to achieve my desired result. Am I missing anything?

EDIT: I also can't use the offset to control this behavior because I don't know what the final calculation will be until the schedule is created.

Expected Behavior

In the example above, I'd prefer to have the schedule's first run be at my specified "StartAt". So, if I say:

"Start this workflow every 365 days with start at 2025-02-03 04:05:06", then the upcoming runs would look like:

  • 2025-02-03 04:05:06
  • 2026-02-03 04:05:06
  • 2027-02-03 04:05:06
  • etc.

Actual Behavior

When I pick 365 days as the interval, I seem to be getting a date 6 months in the future.

Steps to Reproduce the Problem

  1. Go to temporal UI and add a schedule.
  2. Choose 365 days and save.
  3. Check the schedule's upcoming runs.

Specifications

  • Version:
  • Platform:

Contributor guide

Open the contributing guide

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.