LiteJobs 1.0.1

dotnet add package LiteJobs --version 1.0.1
                    
NuGet\Install-Package LiteJobs -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LiteJobs" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LiteJobs" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="LiteJobs" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LiteJobs --version 1.0.1
                    
#r "nuget: LiteJobs, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LiteJobs@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LiteJobs&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=LiteJobs&version=1.0.1
                    
Install as a Cake Tool

๐Ÿš€ LiteJobs

LiteJobs is a lightweight, database-backed background job processor for .NET โ€” built for simplicity, zero external dependencies, and easy integration.

No Redis. No RabbitMQ. No complex setup. Just your existing database and a few lines of code.


โœจ Why LiteJobs?

  • ๐Ÿชถ Lightweight & simple
  • ๐Ÿ—„๏ธ Uses your existing database (EF Core)
  • ๐Ÿ” Built-in retry mechanism
  • โš™๏ธ Background worker included
  • ๐Ÿงฉ Easy integration with DI
  • ๐Ÿšซ No external infrastructure required

๐Ÿ“ฆ Installation

Install via NuGet:

dotnet add package LiteJobs

โšก Getting Started

1๏ธโƒฃ Register LiteJobs

builder.Services.AddLiteJobs<AppDbContext>();

2๏ธโƒฃ Register your job service

builder.Services.AddScoped<IMyService, MyService>();

3๏ธโƒฃ Create a job service

public interface IMyService
{
    Task DoWork(int number);
}

public class MyService : IMyService
{
    public Task DoWork(int number)
    {
        Console.WriteLine($"Job executed: {number}");
        return Task.CompletedTask;
    }
}

4๏ธโƒฃ Enqueue a job

await _jobClient.Enqueue<IMyService>(x => x.DoWork(99));

5๏ธโƒฃ Run migrations

dotnet ef migrations add Init
dotnet ef database update

๐Ÿง  How It Works

  1. Job is enqueued via IJobClient
  2. Job is stored in database
  3. Background worker polls pending jobs
  4. Job is executed via reflection
  5. Status is updated (Pending โ†’ Processing โ†’ Succeeded/Failed)

๐Ÿ“Š Job Status Flow

Status Description
Pending Waiting to be processed
Processing Currently executing
Succeeded Completed successfully
Failed Failed after retries

๐Ÿ” Retry Behavior

LiteJobs automatically retries failed jobs:

  • Default retries: 3
  • Configurable per job (coming soon)

๐Ÿ—„๏ธ Database Schema

LiteJobs creates a table:

LiteJobs

Includes:

  • JobType
  • Method
  • Payload (JSON)
  • Status (stored as string)
  • Retries
  • CreatedAt

๐Ÿงช Supported Method Signatures

LiteJobs supports:

DoWork()
DoWork(int id)
DoWork(string name)
DoWork(Guid id)
DoWork(int id, string name, bool flag)

โš ๏ธ Limitations (v1)

  • Not distributed (single instance)
  • No dashboard UI (yet)
  • No delayed/scheduled jobs (yet)

๐Ÿ›ฃ๏ธ Roadmap

  • Delayed jobs
  • Cron jobs
  • Dashboard UI
  • Distributed support
  • Logging improvements

๐Ÿ“š Documentation

More detailed docs coming soon.


๐Ÿค Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create a new branch
  3. Make your changes
  4. Submit a PR

๐Ÿ’ฌ Feedback

If you have ideas, suggestions, or issues:

๐Ÿ‘‰ Open an issue on GitHub ๐Ÿ‘‰ Or reach out directly


โค๏ธ Support

If you find LiteJobs useful:

โญ Star the repo ๐Ÿ“ข Share it with others


๐Ÿ“„ License

MIT License


๐Ÿ‘จโ€๐Ÿ’ป Author

Built with โค๏ธ by Salman Tahir

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 117 4/26/2026
1.0.0 105 4/26/2026