docs: document cron schedule windows - #4657
Conversation
|
WalkthroughAdded documentation for schedule windows. It describes deterministic run spreading, duration and percentage formats, zero-window behavior, configuration methods, and nominal versus effective timestamps. It adds Merge Risk: 🟡 Moderate · up to The PR adds schedule-window documentation and OpenAPI descriptions, but the current text contains bounded contract inaccuracies about default timing, effective timestamps, accepted values, and zero-window behavior, while some examples do not follow repository guidance. These issues can mislead users integrating scheduled tasks and should be fixed or explicitly accepted before merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
docs/tasks/scheduled.mdx (2)
158-179: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winMake the new code examples copy/paste ready.
Use the required
typescriptfence tag instead ofts. Addimport { schedules } from "@trigger.dev/sdk";to the examples. If the imperative example remains separate, also make itsdailyReportdependency explicit.As per coding guidelines: Use
typescript,bash, andjsonfence tags; always import from@trigger.dev/sdk; and make examples complete and runnable where possible.Source: Coding guidelines
170-179: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winAdd
windowto the full SDK example.The new imperative example documents
window, but the laterschedules.create()example described as containing “all the options” in Lines 283-302 does not include it. Add awindowproperty there, or change that heading, so the full example does not imply that windows cannot be combined withtimezone,externalId, anddeduplicationKey.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 8b31d954-33be-4e1a-8fdb-dadeacc1f0bd
📒 Files selected for processing (1)
docs/tasks/scheduled.mdx
Included review availability: Your plan includes up to 10 reviews per rolling hour; 8 remain after this review.
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
- GitHub Check: Analyze (actions)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: code-quality / code-quality
🧰 Additional context used
📓 Path-based instructions (1)
docs/**/*.mdx
📄 CodeRabbit inference engine (docs/CLAUDE.md)
docs/**/*.mdx: MDX documentation pages must include frontmatter with title (required), description (required), and sidebarTitle (optional) in YAML format
Use Mintlify components for structured content: , , , , , , /, /
Always import from@trigger.dev/sdkin code examples (never from@trigger.dev/sdk/v3)
Code examples must be complete and runnable where possible
Use language tags in code fences:typescript,bash,json
Files:
docs/tasks/scheduled.mdx
🧠 Learnings (2)
📚 Learning: 2026-03-10T12:44:14.176Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 3200
File: docs/config/config-file.mdx:353-368
Timestamp: 2026-03-10T12:44:14.176Z
Learning: In the trigger.dev repo, docs PRs are often companions to implementation PRs. When reviewing docs PRs (MDX files under docs/), check the PR description for any companion/related PR references and verify that the documented features exist in those companion PRs before flagging missing implementations. This ensures docs stay in sync with code changes across related PRs.
Applied to files:
docs/tasks/scheduled.mdx
📚 Learning: 2026-04-30T20:30:29.458Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3226
File: docs/ai-chat/quick-start.mdx:13-13
Timestamp: 2026-04-30T20:30:29.458Z
Learning: In this repo’s documentation MDX files (`docs/**/*.mdx`), use `ts` and `tsx` (not `typescript`) as the code-fence language tags for TypeScript/TSX snippets. Do not flag `ts`/`tsx` code-fence language tags as incorrect in any docs MDX file, since this is the site-wide Mintlify-compatible convention.
Applied to files:
docs/tasks/scheduled.mdx
🪛 LanguageTool
docs/tasks/scheduled.mdx
[style] ~145-~145: To elevate your writing, try using more formal phrasing here.
Context: ...he load is smoothed while each schedule keeps firing at a predictable, repeatable moment. T...
(CONTINUE_TO_VB)
🔇 Additional comments (1)
docs/tasks/scheduled.mdx (1)
149-154: LGTM!
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 57ae8af2-a2eb-4eff-8bbe-db02a3ee0207
📒 Files selected for processing (1)
docs/v3-openapi.yaml
Included review availability: Your plan includes up to 10 reviews per rolling hour; 7 remain after this review.
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
- GitHub Check: code-quality / code-quality
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
docs/v3-openapi.yaml (1)
5827-5831: LGTM!
fea8e91 to
182ee5d
Compare
@trigger.dev/build
trigger.dev
@trigger.dev/core
@trigger.dev/python
@trigger.dev/react-hooks
@trigger.dev/redis-worker
@trigger.dev/rsc
@trigger.dev/schema-to-json
@trigger.dev/sdk
commit: |
Documents schedule windows on the Scheduled tasks page: what a window does, the accepted values (
30m/2h/50%, zero to disable), how to set it on declarative and imperative schedules, and the nominal-vs-effective time distinction (nextRun/nextRunEffectiveAt).Follows #4566 and #4572.
TRI-13294