Is there a reason you're not using
a webhook to capture updates from the API? Or do you just need to keep polling?
If you need to just keep polling, I'd recommend using a managed background task service like SWF on AWS or Cloud Tasks on GCP. Not worth the trouble of debugging to build it yourself these days