OxCore.QuantumQueue.Core
8.0.2
See the version list below for details.
dotnet add package OxCore.QuantumQueue.Core --version 8.0.2
NuGet\Install-Package OxCore.QuantumQueue.Core -Version 8.0.2
<PackageReference Include="OxCore.QuantumQueue.Core" Version="8.0.2" />
<PackageVersion Include="OxCore.QuantumQueue.Core" Version="8.0.2" />
<PackageReference Include="OxCore.QuantumQueue.Core" />
paket add OxCore.QuantumQueue.Core --version 8.0.2
#r "nuget: OxCore.QuantumQueue.Core, 8.0.2"
#:package OxCore.QuantumQueue.Core@8.0.2
#addin nuget:?package=OxCore.QuantumQueue.Core&version=8.0.2
#tool nuget:?package=OxCore.QuantumQueue.Core&version=8.0.2
π OxCore.QuantumQueue
OxCore.QuantumQueue is a lightweight, CRON-based job scheduler for .NET applications. Designed to be modular and developer-friendly, it lets you easily run background tasks with precise control over execution timing.
π¦ Installation
Install the NuGet package:
.NET CLI
dotnet add package OxCore.QuantumQueue.Core --version 8.0.2
Package Manager
Install-Package OxCore.QuantumQueue.Core --version 8.0.2
βοΈ Getting Started
To start using OxCore.QuantumQueue, follow these steps in your .NET Core app.
1β£ Register Services
Add the following in your Program.cs:
builder.Services.OxCoreService();
This registers all required services and job dependencies into the DI container.
2β£ Enable Job Scheduler Middleware
After configuring your app and building it, add this line:
app.UseJobScheduler();
This activates the job scheduler and runs all registered jobs based on their defined schedules.
3β£ Create a Job
Implement the IJob interface to define a recurring background task:
using OxCore.QuantumQueue;
public class SampleJob : IJob
{
public string CronExpression => "*/5 * * * *"; // every 5 minutes
public async Task ExecuteAsync(CancellationToken cancellationToken)
{
Console.WriteLine($"[SampleJob] Executed at: {DateTime.Now}");
await Task.CompletedTask;
}
}
4β£ Register the Job
You do not need to manually register your job; it is automatically discovered and registered by the application.
π§ͺ Example: Data Sync Job
public class DataSyncJob : IJob
{
public string CronExpression => "0 */6 * * *"; // Every 6 hours
public async Task ExecuteAsync(CancellationToken cancellationToken)
{
Console.WriteLine("[DataSyncJob] Syncing data...");
await MySyncService.SynchronizeAsync();
}
}
β° CRON Expression Guide
| Field | Allowed Values | Description |
|---|---|---|
| Minute | 0β59 | Minute of the hour |
| Hour | 0β23 | Hour of the day |
| Day of month | 1β31 | Day of the month |
| Month | 1β12 or JANβDEC | Month |
| Day of week | 0β6 or SUNβSAT | Day of the week (0 = Sun) |
Examples:
*/5 * * * *β every 5 minutes0 0 * * *β every day at midnight0 12 * * 1β every Monday at 12:00 PM
Use crontab.guru to generate or validate CRON expressions.
π Scoped Job Dependency Support
You can inject services inside your jobs using constructor injection:
public class EmailJob : IJob
{
private readonly IEmailService _emailService;
public EmailJob(IEmailService emailService)
{
_emailService = emailService;
}
public string CronExpression => "0 8 * * *"; // Every day at 8 AM
public async Task ExecuteAsync(CancellationToken cancellationToken)
{
await _emailService.SendScheduledEmailsAsync();
}
}
Make sure to register the dependency in Program.cs:
builder.Services.AddScoped<IEmailService, EmailService>();
π§Ή Features
- β Simple setup and lightweight design
- β±οΈ Flexible CRON-based scheduling
- β»οΈ Supports scoped DI with
IJob - π₯΅ Thread-safe and cancellation-aware
- π Automatically discovers and runs all registered jobs
- π§ͺ Testable architecture with modular components
π οΈ Advanced Configuration (coming soon)
Custom options for:
- Retry policies
- Error handling strategies
- Dynamic job enable/disable
- Job health monitoring
Stay tuned for future releases!
π§Ό Best Practices
- Avoid blocking threads (use
async/await) - Use logging to trace job runs
- Wrap your job logic in try-catch blocks to prevent silent failures
π License
This project is licensed under the MIT License.
π€ Contributing
We welcome community contributions!
To contribute:
- Fork the repo
- Create a new feature branch
- Submit a pull request
Created with β€οΈ by OxCore Team (Prabuddha Jayawardhana)
| Product | Versions 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. |
-
net8.0
- OxCore.QuantumQueue.SharedKernel (>= 8.0.0)
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 | |
|---|---|---|---|
| 9.0.8 | 508 | 6/12/2025 | |
| 9.0.6 | 277 | 6/8/2025 | |
| 9.0.5 | 167 | 6/7/2025 | |
| 9.0.4 | 174 | 6/7/2025 | |
| 9.0.3 | 144 | 6/6/2025 | |
| 9.0.2 | 186 | 6/6/2025 | |
| 9.0.1 | 171 | 6/6/2025 | |
| 9.0.0 | 206 | 5/18/2025 | |
| 8.0.11 | 199 | 5/18/2025 | |
| 8.0.10 | 440 | 5/18/2025 | |
| 8.0.9 | 442 | 5/18/2025 | |
| 8.0.8 | 439 | 5/18/2025 | |
| 8.0.7 | 443 | 5/18/2025 | |
| 8.0.6 | 439 | 5/18/2025 | |
| 8.0.5 | 196 | 5/18/2025 | |
| 8.0.4 | 198 | 5/18/2025 | |
| 8.0.3 | 209 | 5/18/2025 | |
| 8.0.2 | 199 | 5/18/2025 | |
| 8.0.1 | 200 | 5/18/2025 | |
| 8.0.0 | 296 | 5/18/2025 |