I have notebook running in our AGOL site every 15 minutes. The code is pretty simple, only takes about 10 seconds to run. However, there's been a few times in the last week since it started where it sits in 'executing' status for 4 to 6 hours so all the runs in that time are skipped. I'm thinking it might just being hanging while trying to connect to the AGOL. Is there a way to force the next iteration to run instead of skipping? Or shutdown the Notebook if it runs for more than ~2 minutes?
There is a python module multiprocessing, which is available in the AGOL Notebook environment, that can handle this. By running a parallel "timer" process, you can force-quit your notebook if it runs long.
See this Stack Overflow answer that gives a nice example. I don't work extensively with multiprocessing myself, and have not tested this in a Notebook setting specifically, but it's a place to start.
It basically depends on what lines it is skipping. Sharing a code snippet would have been useful. I had a similar issue where I was generating centroids and wanting to use centroid coordinates. What I did was to ensure the centroids are written on portal and on the consequent run, the code would search for the new write and utilize it. In other instances, I introduced sleep time to make sure latency was covered for. See code snippet below
@JasonJordan00 I have found the same thing too. See my reply to the post here: https://community.esri.com/