What you want is to make a Job. Job is a task that will be performed every x value range and you can implement (not recommend) or use a third solution.
I know some like the Hangfire, Quartz, Rabbitmq or up to the Azure has solutions to register a service. In my case I will explain the Hangfire because it is the only one I know.
You need to create a recurring Job, where the server will call every x time your method:
RecurringJob.AddOrUpdate(() => MeuMetodoAValidarOBanco(), Cron.Daily);
Note that he does not use Datetime, usually for Job the concept of Cron is used. Cron is a string expression that you can work better with time intervals. Hangfire itself gives some simpler options, but there is this website where you can generate your expressions.
Because it’s a service, you can either upload it as a Windows service or even upload it to your API. The only problem with the latter is that IIS clears the pool when no one accesses the API. Follow the link for a related question here on Stack.
Guy the bank start a project I won’t know how to tell you, but if the service is already running you can create a Trigger or something for when someone does an UPDATE.
– Gabriel Coletta
Would it have to be through notification, like: FCM or GCM https://firebase.google.com/docs/cloud-messaging/? hl=en I am also interested in joining this service to my Webservice
– Reginaldo Rigo
@Gabrielcoletta, it’s not the start bank. What I want if it is possible to make a type of timer for the service, that every 10s, for example, it makes a select in the table and see if changed. If yes, then send the notification to the App.
– pnet