0Pricing
C# Academy · Lesson

Worker Service Projects

Create a standalone Worker Service, configure DI and logging, and deploy it as a Windows Service or Linux daemon.

What Is a Worker Service?

A Worker Service is a .NET project template for building long-running background applications — no web server, no HTTP endpoints. It's a lightweight host perfect for queue processors, scheduled tasks, and daemon-style services.

Creating a Worker Service

Use the CLI template to scaffold a Worker Service project. It generates a minimal Program.cs and a Worker.cs class that inherits from BackgroundService.

# Create a new Worker Service project
dotnet new worker -n OrderProcessor

# Generated structure:
# OrderProcessor/
#   Program.cs       — host configuration
#   Worker.cs        — your BackgroundService subclass
#   appsettings.json

All lessons in this course

  1. IHostedService & BackgroundService
  2. Worker Service Projects
  3. Periodic Tasks & Timers
  4. Quartz.NET Scheduled Jobs
← Back to C# Academy