Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

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

$
0
0

I'm in a situation where I want to trigger some background job using hangfire. I don't want to trigger the event based on cron (each period of time) but I want it to get triggered when there are new changes.

In my table, for example when new record is added I want hangfire to trigger the background process. Is this possible? If yes ,please adivse if there's any resource I can refer to?

my current code is like this :

_backgroundJobClient.Schedule(() => _epcProcess.EPCProcessStart(transactionId), TimeSpan.FromMinutes(1));

recurring each hour

RecurringJob.AddOrUpdate<IBackgroundOperations>(x => x.ProcessNewTransactions(), "0 * * * *");

and my expectations is to schedule based on new changes on table


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>