I'm running a .NET Core web application in IIS which fires a web request every few minutes, this works absolutely fine, the application checks the database and if the time has already expired it executes the web request doing my task.

The problem I'm having is that after a while the app just stops

How can this be fixed?