Skip to content

feat: add NextN method to SpecSchedule#570

Open
walle250ai wants to merge 1 commit intorobfig:masterfrom
walle250ai:master
Open

feat: add NextN method to SpecSchedule#570
walle250ai wants to merge 1 commit intorobfig:masterfrom
walle250ai:master

Conversation

@walle250ai
Copy link
Copy Markdown

Summary

  • Add NextN(t time.Time, n int) []time.Time to SpecSchedule
  • Returns the next n activation times after t, in ascending order
  • Reuses the existing Next method internally — no duplicate logic
  • Returns an empty slice when n <= 0; stops early if Next returns zero (no valid time within 5 years)

Test plan

  • n=0 and negative n return empty slice
  • n=1 returns the correct single next time
  • n=3 with */1 * * * * * returns 3 consecutive seconds
  • Unsatisfiable schedule (Feb 30) returns fewer than n results
  • Results are verified to be strictly increasing

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant