v406 - Notification Scheduler Runbook and Cron Setup Guidance
Decision
v406 continues the notification track one final step instead of moving directly to another operational surface. v405 made Super Admin scheduler health visible. v406 adds the runbook and cron setup guidance needed to safely operate the protected scheduler.
This closes the notification track enough to pivot next into workspace parity and membership/subscription planning.
What changed
- Added Super Admin scheduler runbook guidance to Notification Governance.
- Added cron setup examples for dry-run checks and guarded live execution.
- Added setup, verification, rollback, and guardrail steps for scheduler operation.
- Added scheduler environment variables to .env.example.
- Kept the scheduler secret value out of browser-facing surfaces.
- Kept /notifications alert/action-only.
- Kept provider setup in /company/integrations.
- Avoided Prisma schema changes.
Placement rules preserved
- /notifications remains alert/action-only.
- Workspace Settings > Notifications remains the workspace-level notification preferences, digest preview, digest history, and scheduler history surface.
- /company/integrations remains the provider setup and credential surface.
- /admin/notifications may show Super Admin scheduler health and runbook guidance, but not secret values, raw authorization headers, SMTP credentials, raw provider diagnostics, or raw delivery logs.
Scheduler runbook summary
Use the protected endpoint:
`/api/app-notifications/email-digest/scheduler`
Required server environment variables:
- `DISPATCH_SPOT_NOTIFICATION_DIGEST_WEBHOOK_SECRET` - strong random protected webhook secret. The value must never appear in the browser.
- `DISPATCH_SPOT_NOTIFICATION_AUTO_DIGEST_ENABLED` - keep false during dry-run testing; set true only when live automatic sends are approved.
- `SMTP_ENABLE_DELIVERY` - must be true before live email delivery can occur.
Recommended rollout:
1. Configure the secret.
2. Run dry-run scheduler checks.
3. Review Super Admin scheduler health and Workspace Settings history.
4. Enable automatic sends only after approval.
5. Add the protected server-side cron job.
6. Start with small organization/user limits.
7. Widen cadence after results remain healthy.
Next product direction
After v406, return to planning rather than continuing more notification depth by default. The next recommended track is workspace parity and role-differentiation planning, followed by membership subscription/trial-period registration workflow planning.