I want to make NextJs app that every 15 minutes makes API calls on the server and saves results in database. And then clients would fetch data from my database and not from the 3rd party API provider. The purpose of such setup is to avoid overrunning daily API calls limit given by the 3rd party provider.
I cannot get the idea where in my app should I put the function that fetches data from API on server start and does so every 15 minutes.
Any idea?