Platform scheduling (Vercel cron vs container setInterval)
Generated from
mcp/patterns.registry.json— do not edit by hand; change the registry and runbun run patterns:build.
Index card — the docs below are the canonical explanation; deep-tier pattern pages additionally carry invariants and emulation notes.
Category: Jobs & Scheduling · Tier: light · Risk: medium — touches deploy config (vercel.json crons) and background execution
Cadence is owned entirely by platform config — vercel.json crons hitting /api/cron/[job] on serverless, or a single flat setInterval scheduler on persistent containers — so the job registry itself never changes when switching hosts.
When to use: Use when a job must run on a schedule across more than one hosting target without duplicating scheduling logic per platform.
Docs
- docs/blueprint/architecture/jobs.md (GitHub · GitLab)
- docs/blueprint/deployment.md (GitHub · GitLab)
Code
src/lib/server/jobs/scheduler.ts(GitHub · GitLab)src/routes/api/cron/(GitHub · GitLab)vercel.json(GitHub · GitLab)
Machine-readable record: jobs-platform-scheduling in mcp/patterns.registry.json.