Dotnet Hosted Services

.NET hosted-service and worker conventions - the long-running background work the generic host runs. Covers the host shapes (worker binary, in-web-app task, Windows Service), IHostedService versus BackgroundService versus IHostedLifecycleService, the ExecuteAsync exception trap, scoped services from the singleton host, PeriodicTimer over Task.Delay, graceful shutdown, and System.Threading.Channels queues - plus references/ for 24/7 I/O hardening, scheduling/leader election, deployment/signals. Floors at .NET 8 / C# 12. Load when writing a worker service, BackgroundService or IHostedService, a periodic job, a bot/daemon host, or any in-process background task hung off the host. Companions: dotnet-messaging, dotnet-web-backend, csharp. Do NOT load for the broker side of a consumer (dotnet-messaging; the consumer's host process is still this skill), HTTP endpoints, or reactive in-memory streams.

envoydev Updated 1 repo stars

File contents

envoydev/claude-stack commit e1bcdf179d

Frequently asked questions

npx get-skill add envoydev/dotnet-hosted-services