Summary
Scheduled Vercel opportunities total 2,887 per day in this repository. Moving
only the schedule does not reduce processor invocations; processor moves do.
Overlap safety classes
Cutover safety depends on whether two owners can run the same slot without duplicating a side effect. Cron Control’s slot claim deduplicates its own ticks, not a concurrent Vercel tick.Vercel Cron jobs
Declaration locations for these 13 current Vercel schedules:
Per-job Vercel declaration lines and current cadences:
The Web cron catalog lists deadline reminders every four hours, but the deployed
Vercel entry runs every five minutes. Preserve the live cadence; do not run
sync-web-crons, which would also drop report automation from the schedule.
pg_cron jobs
Live jobs after replaying every migration’s schedule and unschedule calls.process-notification-batches was unscheduled by a later migration.
Schedule declaration locations for the live jobs:
process-notification-batches is excluded from the live count because
apps/database/supabase/migrations/20251111101347_update_notification_batch_processor_to_call_api.sql:13
unschedules it. The migration replay, rather than the initial schedule alone,
defines the current PostgreSQL owner set.
Retained exceptions. Each retained job runs a single statement against
Postgres tables with no HTTP, storage or provider side effect. A Cloudflare
trigger would add a Worker invocation and a service-key HTTP round trip per tick
to execute the same SQL in the same database: more cost and credential exposure,
no compute moved off Supabase. Owners should still review the three every-minute
jobs’ cadence. Any job that gains an outbound call loses its exception.
Next.js after() continuations
These run after the response on the hosting function, with no durable owner. A
crashed or recycled function silently loses them.
The nine active
after() call sites are request/webhook continuations, not
durable schedules:
Processors without a hosted schedule
These routes exist but no Vercel entry, pg_cron job or Worker trigger calls them. They may have relied on the retired Docker runner; confirm the intended owner before scheduling any of them.
These eight processor routes have no current hosted schedule:
Workspace managed cron jobs (
workspace_cron_jobs) have a due-job claim RPC
but no live scheduler since the Docker runner retired; only run-now routes
execute them. A Cron Control job draining that claim RPC is the target, gated on
a product decision because enabling it starts user-defined outbound requests.
Existing Cloudflare owner
apps/cron-control runs every five minutes, requeues stale push batches and
calls the Web immediate-delivery processor only when a pending immediate batch
exists. See Cloudflare Cron Control.
Phase 1: pay-products scheduler qualification
pay-products is the first scheduler move because it runs twice per day and the
existing processor converges product rows with provider-ID upserts. Cron Control
already declares the same 0 */12 * * * schedule and the authenticated Pay
processor route. The dispatch regression now pins its per-slot request bound,
single transient retry, duplicate-slot behavior, and durable stop after five
failed slots across ledger reconstruction.
This phase qualifies source behavior only. CRON_CONTROL_ENABLED_JOBS remains
empty in apps/cron-control/cloudflare.config.ts, and the Vercel declaration
remains active in apps/pay/vercel.json. Do not change either until an authorized
production rollout has installed the Pay origin and matching cron secret, shown
one successful Cloudflare slot, and recorded the Vercel last-run boundary. The
old Vercel schedule stays the owner until then. Roll back a later cutover by
stopping/removing pay-products from Cron Control and restoring its Vercel entry.
The five scheduled GitHub workflows are operational automation rather than
product background work: .github/workflows/mobile-testflight-review-queue.yaml
drains a release-review queue; release-please-auto-merge.yaml handles release
branches; actions-storage-report.yaml reports CI artifact storage;
security-checks.yaml runs security scans; and
security-review-sweep.yaml handles security-review automation. They remain on
GitHub Actions and are not part of the product scheduler migration.
Exact GitHub schedule declarations:
Schedule catalogs and empty owners
apps/web/cron.config.json:6-60 and
apps/infrastructure/cron.config.json:6-36 are source catalogs consumed by
schedule generation and monitoring. They are not all current triggers: the Web
deadline-reminder catalog says every four hours while Vercel runs every five
minutes; Calendar gateway entries have vercel: false; the immediate-notification
path is already on Cron Control; and the Hive catalog route is disabled. No
supabase/functions/ tree, Trigger.dev config/SDK/import, or active
packages/workflows task runner exists in this checkout.
apps/cron-control/cloudflare.config.ts:21-31 declares nine Cron Trigger
expressions. The checked-in active Cloudflare owner is immediate-notification
recovery; the 14 legacy jobs in apps/cron-control/src/jobs.ts:63-167 remain
default-off in cloudflare.config.ts:40. A catalog entry is not evidence that a
hosted trigger is enabled or healthy.
Migration waves
- Scheduler cutover. Qualify and then move
pay-productsfirst, preserving its 12-hour cadence, default-off behavior, auth contract and per-slot operation envelope. Next movetasks-cleanup-media,infrastructure-sync-trust-cache,calendar-provider-sync, and thefinance-exchange-ratespg_net call. Then move the claim-fenced jobsweb-notification-batches,web-post-email-queue,web-topic-announcements,web-report-automation, andinventory-checkout-expiry. Movecalendar-smart-scheduleandweb-deadline-remindersonly after removing their old owner and confirming its last run. Keep the seven pure-SQL jobs in Postgres under the existing exception. - Worker processors. Keep checkout expiry as the tested template, then
move cleanup media with a durable cursor, product sync with bounded
pagination/upserts, and trust-cache writes with their 32-write concurrency
cap. Keep the
pay-productsWorker processor default-off until the Worker path has exact-artifact and runtime acceptance. - Queues and workflows. Move notification, email, announcement and report
delivery, calendar provider sync, then the
after()sites, with retry budgets aligned to their existing claims and persisted progress. - Retirements. Confirm with Infrastructure owners whether to retire
infrastructure-docker-recovery-alertsandinfrastructure-sample-resources; retire the disabled Hive simulation route only after its owner confirms there is no remaining need.