I am writing Job Schedulerusing the library Quartzat C#. My requirement is that if the business condition is met, I need to call the server Apple.
Here's what my planner looks like: -
public class CustomerJob : BaseJob
{
private readonly ICustomerSchedulerService _customerSchedulerService;
public CustomerJob (ICustomerSchedulerService customerSchedulerService)
{
_customerSchedulerService= customerSchedulerService;
}
public override void Execute(IJobExecutionContext context)
{
var customers = _customerSchedulerService.CheckExpiredTask();
foreach(var customer in customers)
{
}
base.Execute(context);
}
}
So how to solve this requirement?
Note: -
I would not prefer to move this to an API or web project, since this scheduler will be called from the Web and API commands and others (and).
Thank.
source
share