Detailed design and simple analysis of ABP background job

Time:2021-7-28

This paper roughly analyzes the main objects and functions of backgroudjob in ABP. It’s a review of this module. You can refer to it when you do third-party integration in the future.

Modules involved:

Volo. ABP. Backgroundjobs: the default background task manager implementation.

Volo. ABP. Backgroundjobs. Abstractions: some common definitions of background tasks.

Volo. ABP. Backgroundjobs. Hangfire: background task manager based on hangfire library.

Note:

All backstage workers are through  IBackgroundWorkerManager  For management, it provides  StartAsync()StopAsync()Add()  method.Add()  The method is to dynamically add our background workers.DoWork()Method uses the timer abptimer to call the method regularly. In this method, the background job is obtained from the default memory and executed regularly.