Worker Services and Background Tasks BackgroundService (Preferred) Queue-Based Worker (Channel) Timed Background Service Standalone Worker Service Key Patterns - Always use to create scopes in workers (hosted services are singletons, scoped services like DbContext need their own scope) - Use instead of for scheduled work (more accurate, respects cancellation) - Use for producer/consumer queues (thread-safe, backpressure support) - Handle exceptions in the loop body, not outside (prevents worker from stopping on error) - Check in all loops and pass it to async operations - Log lifecycle events…