Base solution for your next web application
Open Closed

does not call BackgroundJob #5754


User avatar
0
jehadk created

Dears,

I created BackgroundJob class and added to PostInitialize => workManager.Add(IocManager.Resolve<xxBackgroundJob>());

why the job does not worked

public class xxBackgroundJob : PeriodicBackgroundWorkerBase, ISingletonDependency { private const int CheckPeriodAsMilliseconds = 5000;////10006010; private readonly IInsTariffIntegAppService _IInsTariffIntegAppService;

    public BarzanBackgroundJob(AbpTimer timer, IInsTariffIntegAppService theIInsTariffIntegAppService)
        : base(timer)
    {

        _IInsTariffIntegAppService = theIInsTariffIntegAppService;
        Timer.Period = CheckPeriodAsMilliseconds; //5 seconds (good for tests, but normally will be more)
        Timer.RunOnStart = true;

    }

    [UnitOfWork]
    protected override void DoWork()
    {
        _IInsTariffIntegAppService.CrtInsTariffSetup1();
    }
}

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

    It seems that you are referring to the example created by this document. This is no problem.

    Can you look at the information in the log file?

  • User Avatar
    0
    jehadk created

    How I can send to you my logs

  • User Avatar
    0
    maliming created
    Support Team

    You can share the relevant log files as attachments.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Closing due to inactivity.