Making an always running/active game.

I am creating a game that needs to run 24/7. I am doing an API call every 5 seconds to check for a change in game state however the scripts stops running after some time. I have created a timer in Update() and that stops after an hour or so and I have created a Coroutine that calls itself after 5 seconds and that stops after 3 or so hours. The rest of the game is running fine. Is the script falling asleep? Does anyone have an idea what is going on?

How can we tell if you won’t actually show us the code in question?

Here is the Update code (Runs for about an hour)

   void Update()
{
    if (Time.time > callAPIDuration_PlusTime)
    {
        DoAPICall();
        callAPIDuration_PlusTime = Time.time + 5;
    }
}

Here is the Coroutine (Runs for 3 hours then stops)

 IEnumerator CallApi()
    {
        yield return new WaitForSeconds(5f);
        DoAPICall();
        StartCoroutine(CallApi());
    }

You reschedule a new coroutine every time. It would be more efficient if you put the yield and call in a while(true) statement.