What you want is to do a Job. Job is a task that will be performed every x value range and you can implement (do not recommend) or use a third solution.
I know some like HangFire , Quartz , RabbitMQ or even Azure has solutions for registering a service. In my case I will explain 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);
Notice that it does not use DateTime, but for Job the Cron concept is used. Cron is a string expression that lets you work better with time intervals. HangFire itself has some simpler options, but there is a website where you can generate your expressions.
As a service, you can upload it as a Windows service or even upload it to your API. The only problem with the latter is that IIS cleans up the pool when no one accesses the API. Here's the link for a related question here in the Stack.