Skip to content

Schedule workflow runs with Date or duration string#248

Merged
jamescmartinez merged 4 commits intomainfrom
schedule-workflow
Feb 4, 2026
Merged

Schedule workflow runs with Date or duration string#248
jamescmartinez merged 4 commits intomainfrom
schedule-workflow

Conversation

@jamescmartinez
Copy link
Copy Markdown
Contributor

@jamescmartinez jamescmartinez commented Feb 4, 2026

#246

Summary

This PR adds support for scheduling runs with either a Date or a duration string (e.g., 5m).

Screenshot 2026-02-04 at 12 33 47 PM

Copilot AI review requested due to automatic review settings February 4, 2026 18:35
@jamescmartinez jamescmartinez changed the title Schedule workflow Schedule workflow runs with Date or duration string Feb 4, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for scheduling workflow runs to start at a specific time by introducing an availableAt run option that accepts either an absolute Date or a duration string (e.g. "5m").

Changes:

  • Add availableAt?: Date | DurationString to WorkflowRunOptions and resolve duration strings to an absolute Date before persisting the run.
  • Add client tests covering availableAt with a Date, a duration string, and invalid duration handling.
  • Update README and docs to document scheduled runs usage.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
packages/openworkflow/client.ts Adds availableAt run option and converts duration strings into an absolute Date during run creation.
packages/openworkflow/client.test.ts Adds tests validating scheduled run creation and invalid duration behavior.
packages/openworkflow/README.md Updates feature list to include scheduled runs.
packages/docs/docs/workflows.mdx Documents how to schedule a workflow run using availableAt with Date or duration strings.

Comment thread packages/openworkflow/client.ts
Comment thread packages/openworkflow/client.ts
Comment thread packages/docs/docs/workflows.mdx
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread packages/docs/docs/workflows.mdx
Comment thread packages/openworkflow/core/step.ts
@jamescmartinez jamescmartinez merged commit 59102cd into main Feb 4, 2026
7 checks passed
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.

2 participants