I am developing a simple game and I faced a situation I have never studied about. Inside the game there are options and situations that something such as a construction and farming will be finished some hours or minutes after starting. for example I've started my home construction and it will take 3 hours on real life. We assume that 3 hours after it my application must run a function to finish that and update database.
Can any body suggest the best way to me to handle this situation pls?
I used Angular and ASP.Net
There's lots of ways you could do this. You could e.g.
or, as you propose,
run a background job every minute to look for constructions that have just completed for all users in the database and mark completed.
This looks like the latest (at time of writing) way of doing this: ASP.NET Hosted Services. But if you search for "asp.net background tasks" there are plenty of other ways.