I need to implement a complex background process in ASP.NET Core where multiple data import tasks execute in parallel, followed by a final summary email notification once all import tasks complete successfully.
Chaining Jobs in Hangfire
I am trying to determine if standard Hangfire features support continuation workflows for groups of background jobs, or if Hangfire Pro (Batches) is strictly required.
Single Job Continuation Example
// Enqueue the initial background job
string parentJobId = BackgroundJob.Enqueue(() => Console.WriteLine("Importing Chunk 1"));
// Attach a continuation that runs after the parent job finishes
BackgroundJob.ContinueJobWith(parentJobId, () => Console.WriteLine("Chunk 1 complete!"));How can I trigger a final completion task after a dynamic list of N jobs finishes if I am using open-source Hangfire? What strategies exist to achieve batch job behavior without upgrading to a commercial license?
Can you answer this question?
Write Answer0 Answers