Open Closed

BackgroundJob that execute just once #3545


User avatar
0
toptis created
  • ABP Framework version: v5.3.1
  1. How can I create BackgroundJob To execute just once (if an exception occurred) make it abandoned "true" and don't retry the job.
  2. How can I remove old abandoned jobs after 1 day.

1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    How can I create BackgroundJob To execute just once (if an exception occurred) make it abandoned "true" and don't retry the job.

    See: https://docs.abp.io/en/abp/latest/Background-Jobs#configuration You can set the DefaultTimeout to 0 of AbpBackgroundJobWorkerOptions

    How can I remove old abandoned jobs after 1 day.

    You can create a background worker to remove abandoned jobs. see: https://docs.abp.io/en/abp/latest/Background-Workers

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09