DEV Community

Oleksandr Viktor
Oleksandr Viktor

Posted on

πŸš€ BlazorWJb: Integrating Worker Jobs with Blazor Server App

πŸš€ BlazorWJb: Integrating Worker Jobs with Blazor Server

This article demonstrates how to integrate https://github.com/UkrGuru/WJb (Worker Jobs) with a Blazor Server application. The sample provides a simple UI for managing actions and viewing logs in real time.


βœ… Why WJb?

WJb is a lightweight job scheduling and processing library for .NET. It allows you to:

  • Schedule jobs using CRON expressions
  • Execute custom actions asynchronously
  • Log execution details for monitoring and debugging

πŸ” Features in the BlazorWJb Sample

Logs Page

Displays job execution logs with:

  • Date filter
  • Level and Category dropdowns
  • Text search
  • Refresh button

Logs


Actions Page

Manage actions easily:

  • Add, edit, and delete actions
  • Save actions to wjb\actions.json
  • Edit JSON parameters for each action

Actions


βš™οΈ Configuration

  • Actions are stored in wjb\actions.json
  • Logs are displayed from Logs\yyyyMMdd.log files

πŸ”¨ How It Works

  • JobScheduler runs background jobs based on CRON expressions
  • JobProcessor executes actions defined in the Actions page
  • Logs are automatically updated after each job execution

βœ… Getting Started

  1. Clone the sample:

    git clone https://github.com/UkrGuru/WJb.Samples.git
    cd src/BlazorWJb
    
  2. Install dependencies:

    dotnet restore
    
  3. Run the app:

    dotnet run
    

πŸ” Advanced Tips

  • Add custom job types by implementing IAction
  • Deploy as a background service for production workloads

πŸ“š Resources


πŸ’‘ Why Blazor + WJb?

Combining Blazor’s real-time UI with WJb’s job scheduling gives you a powerful dashboard for automation and monitoring.


Top comments (0)