Blog55.7K views4,410 votes0 replies2,128 following
Running Reliable Background Tasks with IHostedService in .NET Core
Replace ad-hoc threads with IHostedService and BackgroundService to run reliable background tasks that respect shutdown, handle scoped dependencies, and avoid crashing your .NET Core application.