How to trigger event based on new updates on DB using hangfire

  Kiến thức lập trình

I am in a situation where i want to trigger some background job using hangfire. I dont want to trigger the event based on cron (each period of time) but i want it to get triggred when there are new changements in my table, for example when new record is added i want hangfire to trigger the background process. is this possible? If yes please any resource i can refer to?

my current code is like this :
_backgroundJobClient.Schedule(() => _epcProcess.EPCProcessStart(transactionId), TimeSpan.FromMinutes(1));
and my expectations is to shedule based on new changements on table

LEAVE A COMMENT