Background jobs and recovery
ServiceStack Background Jobs handles asynchronous provider work, cleanup, rollups, lifecycle transitions, and reconciliation.
Operations · Background processing
Recurring commands
The application registers hourly commands to:
- expire abandoned quota reservations;
- build usage rollups and SaaS snapshots;
- queue quota-threshold notifications;
- process due organization lifecycle requests;
- expire export artifacts;
- reconcile Stripe subscriptions.
Data retention runs daily. Email, webhook, file deletion, notification, and lifecycle commands are queued as business events require them.
JobsHostedService starts the job system and ticks it within the ASP.NET process. If no healthy application instance is running, scheduled work does not progress.
Inspection
/admin-uiprovides ServiceStack job administration and diagnostics./admin/operationssummarizes product-specific failed Stripe events, notifications, lifecycle work, pending reservations, and integration readiness./admin/securityshows retention runs and active support access./admin/customersCustomer 360 shows organization-scoped state needed to understand impact.
Use durable domain/inbox status as the business truth. A job record alone is not proof that a Stripe event, notification, or deletion completed.

Retry procedure
- identify the domain/inbox row and its organization;
- correlate logs and audit with request ID, provider ID, and timestamp;
- fix configuration/provider/data cause;
- confirm the handler is replay-safe;
- use the product-specific retry action when available;
- verify the durable result, not only queue completion;
- record any manual intervention.
Do not enqueue a brand-new business operation with a new idempotency key merely to clear an error. Preserve original event/reservation/provider identifiers.

Stalled work
- Pending reservation past expiry: confirm the expiry command is running; release only through quota policy.
- Failed Stripe inbox: verify signature was accepted, inspect provider object, then retry or reconcile.
- Failed notification: fix SMTP/configuration, respect maximum attempts, then retry.
- Blocked lifecycle request: inspect legal hold, subscription, file-store, and confirmation state before retry.
- Old export artifact: run/inspect expiry; confirm both object and metadata transition.
Multi-instance considerations
Confirm the selected ServiceStack job store and worker model provides the desired single-consumer/lease behavior across instances. Keep its persistent state on durable storage and isolate worker pools for workloads with different latency or concurrency needs.
Related documentation
Observability and health
The template exposes stable correlation, health, metrics, audit, request-log, and operator surfaces without choosing a production telemetry vendor.
External services
Stripe and SMTP are the two production dependencies included by default. The application remains usable on Free plans without Stripe in development, but the default production policy requires both.