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