Перейти к основному содержимому

Platform scheduling (Vercel cron vs container setInterval)

Generated from mcp/patterns.registry.json — do not edit by hand; change the registry and run bun 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

Code


Machine-readable record: jobs-platform-scheduling in mcp/patterns.registry.json.

← Back to Pattern Library

Думаете, этот паттерн можно сделать лучше? Расскажите как.

Оставить отзыв