- distributed and DI based
task schedulerjob schedulerjob queue - designed to be used in applications that use the .Net Host system and Dependency Injection
- simple to use and easy to extend/modify
- every important system is registered as a serivice and can be easily replaced or changed
- uses Redis as a fast and persistent database
Run dotnet add package YAJQ.DependencyInjection
and
Run dotnet add package YAJQ.Hosted
Add required services
builder.Services.AddYAJQ();
builder.Services.AddHostedJobHandler();
Enqueue or schedule a job
await jobQueue.EnqueueJobAsync(() => SendJobCompleteMessage(id)); //Execute instantly
await jobQueue.ScheduleJobAsync(() => SendJobCompleteMessage(id), DateTimeOffset.Now.AddSeconds(5)); //Execute in 5 seconds
...