Base solution for your next web application
Open Closed

BackgroundJob retry count #11433


User avatar
0
bma created

We are using BackgroundJob and IBackgroundJobManager for certain async operations. We need to be able to configure the retry count or total time before the job is set to failed state; either globally or per BackgroundJob. So far we have not found any way to set these. Can someone help?


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @bma

    BackgroundJobs are abandoned after a certain amount of time. The default time is 2 days, you can configure it by setting BackgroundJobInfo.DefaultTimeout value globally. Unfortunaltely, it is not possible to set this for each job.

    If you want a more detailed implementation, you can create your own version of BackgroundJobInfo, for example MyBackgroundJobInfo and override its CalculateNextTryTime method.