Open Closed

How to implement background jobs if Quartz is used with background workers #2095


User avatar
0
LW created

Hello, As it says here https://docs.abp.io/en/abp/latest/Background-Workers-Quartz default Abp background jobs are executed "on top of each other" if they are long running and the job polling interval is shorter. Same job is executed multiple times. This occurs only when Quartz is used with background workers. As the documentation suggests, I added AbpQuartzBackgroundJobs dependency to fix this, but this did not help. Is is so that I cannot use the default background job abstractions in this case and have to use only Quartz's abstractions all the way?


4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    • ABP Framework version: vX.X.X
    • Exception message and stack trace:
    • Steps to reproduce the issue:"
  • User Avatar
    0
    LW created

    ABP Framework version: v4.4.3 Exception message and stack trace: No exceptions Steps to reproduce the issue: We have Project with Quartz for background workers and a project that contains Background jobs. The jobs are default Abp AsyncBackgroundJobs. With this configuration when ever I enqueue a background job to be excecuted, the excecution is done multiple times if background job excecution time exceeds the background job poll interval. If I unload the project that includes the AbpBackgroundWorkersQuartzModule, the background job is excecuted correctly (only once)

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share a simple project and steps to reproduce? liming.ma@volosoft.com

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    As the documentation suggests, I added AbpQuartzBackgroundJobs dependency to fix this, but this did not help

    You can try:

    Is is so that I cannot use the default background job abstractions in this case and have to use only Quartz's abstractions all the way?

    We fixed the problem in the 5.0: https://github.com/abpframework/abp/pull/9821 You can use the default background job when you upgrade to 5.0.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11