EZ.Job.Core
2.0.0
dotnet add package EZ.Job.Core --version 2.0.0
NuGet\Install-Package EZ.Job.Core -Version 2.0.0
<PackageReference Include="EZ.Job.Core" Version="2.0.0" />
<PackageVersion Include="EZ.Job.Core" Version="2.0.0" />
<PackageReference Include="EZ.Job.Core" />
paket add EZ.Job.Core --version 2.0.0
#r "nuget: EZ.Job.Core, 2.0.0"
#:package EZ.Job.Core@2.0.0
#addin nuget:?package=EZ.Job.Core&version=2.0.0
#tool nuget:?package=EZ.Job.Core&version=2.0.0
EZ.Job.Core
Job scheduler fire-and-forget de alta performance usando System.Threading.Channels, com suporte a jobs recorrentes e recuperação automática de jobs pendentes no startup.
Este é o pacote principal do ecossistema EZ.DotNet. Consulte também os stores oficiais: MSSQL, MySQL, PostgreSQL, SQLite, MongoDB, Redis, e o módulo Recurring.
Performance
| Store | Jobs | Workers | EZ.Job (ms) | Hangfire (ms) | Vezes mais rápido |
|---|---|---|---|---|---|
| InMemory | 100 | 1 | 1.63 | 2.07 | 1.27× |
| InMemory | 1000 | 4 | 8.19 | 32.43 | 3.96× |
| MySQL | 100 | 1 | 18.77 | 56.95 | 3.03× |
| MySQL | 1000 | 4 | 115.64 | 299.05 | 2.59× |
| PostgreSQL | 100 | 1 | 21.40 | 68.42 | 3.20× |
| PostgreSQL | 1000 | 4 | 115.07 | 326.91 | 2.84× |
| SQLite | 100 | 1 | 59.45 | 145.06 | 2.44× |
| SQLite | 1000 | 4 | 372.50 | 865.33 | 2.32× |
| Redis | 100 | 1 | 21.64 | 76.86 | 3.55× |
| Redis | 1000 | 4 | 117.15 | 381.56 | 3.26× |
| MongoDB | 100 | 1 | 26.56 | 91.14 | 3.43× |
| MongoDB | 1000 | 4 | 128.55 | 455.13 | 3.54× |
| MSSQL | 100 | 1 | 1.17 | 1.04 | 0.89× |
| MSSQL | 1000 | 4 | 5.43 | 13.80 | 2.54× |
Instalação
dotnet add package EZ.Job.Core
Adicione um store (ex.: InMemory já incluso).
Uso básico
using EZ.Job.Core;
var builder = Host.CreateApplicationBuilder();
builder.Services.AddEZJob(options =>
{
options.WorkerCount = 4;
});
// Injete e use
public class MeuService
{
private readonly IJobDispatcher _dispatcher;
public MeuService(IJobDispatcher dispatcher)
{
_dispatcher = dispatcher;
}
public async Task ExecutarAsync()
{
// Agendamento fire-and-forget
await _dispatcher.EnqueueAsync<EmailService>(s => s.EnviarAsync("email@teste.com"));
}
}
public class EmailService
{
public async Task EnviarAsync(string email)
{
await Task.Delay(100);
}
}
Workers
| Canal | Default Workers | Descrição |
|---|---|---|
| FF | 4 | Processa jobs fire-and-forget imediatamente |
| Recovery | 1 | Reprocessa jobs pendentes ao iniciar |
| Recurring | 1 | Processa jobs recorrentes agendados (via EZ.Job.Recurring) |
Projetos relacionados
| 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 is compatible. 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 is compatible. 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. |
-
net10.0
- EZ.Job.Abstractions (>= 1.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.8)
-
net8.0
- EZ.Job.Abstractions (>= 1.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.0)
-
net9.0
- EZ.Job.Abstractions (>= 1.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on EZ.Job.Core:
| Package | Downloads |
|---|---|
|
EZ.Job.Recurring
Suporte a jobs recorrentes (cron) para EZ.Job.Core — job scheduler fire-and-forget de alta performance. |
GitHub repositories
This package is not used by any popular GitHub repositories.