DEV Community

Oleksandr Viktor
Oleksandr Viktor

Posted on

Basics (Getting Started) with WJb

Basics (Getting Started) with WJb

This guide introduces the fundamental patterns for building job-based applications using the WJb NuGet package. Each sample demonstrates a practical scenario, from the simplest job execution to scheduled tasks.


Basics (Getting Started)

  1. 1stWJb – Minimal console app, first job execution.

    Start with the simplest example: a console application that runs a single job. Perfect for understanding the core concept of IJob and Worker.

  2. ConfigWJb – Using configuration for job settings.

    Learn how to pass arguments and settings to jobs via appsettings.json. This approach makes jobs flexible and environment-friendly.

  3. SqlWJb – Execute SQL commands via WJb.

    Run database operations without EF Core using UkrGuru.Sql. Ideal for lightweight, high-performance jobs that interact with SQL Server.

    👉 View SqlWJb sample

  4. QueueWJb – Simple queue processing.

    Implement a queue-based job processor that polls tasks from a database table and executes them reliably. Includes locking hints and error handling.

  5. TimerWJb – Scheduled jobs using delays.

    Create jobs that run periodically using timers. Great for recurring tasks like health checks, cleanup, or scheduled notifications.


✅ Why WJb?

  • Lightweight: No EF Core, no heavy frameworks.
  • Flexible: Jobs can be triggered by config, queue, or timer.
  • Production-ready: Logging, cancellation, and structured arguments included.

👉 Full source code: UkrGuru.WJb.Samples

📦 NuGet packages:

dotnet add package WJb
Enter fullscreen mode Exit fullscreen mode

Top comments (0)