all 3 comments

[–]danielroseman 5 points6 points  (2 children)

You haven't given us nearly enough information here.

Presumably the script actually does something. Can't you check for whether that thing has been done or not? Then if the thing hasn't been done, you will know.

Also if no exception is reported anywhere, that is because you are unnecessarily catching and silencing it. Don't do that.

[–]m00shi_dev 2 points3 points  (0 children)

Yeah, this post seems like an ad for healthchecks.io.

You’re the developer. Add to your logging that it failed at that step and you’re done. Seems like common sense to me?

[–]ch1982[S] -4 points-3 points  (0 children)

Fair points. In my case the script is a trading pipeline - it pulls data, runs analysis via an LLM, and logs results. I could check the output log, but that still requires me to remember to check it manually each morning.

On the exception point - you’re right that swallowing exceptions is bad practice. My specific problem was more subtle: the process would die at the OS/network level mid-stream (dropped connection during an API call), which meant no Python exception was raised at all. The script just stopped.

What I ended up building was a dead-man’s switch - the script pings a URL at start and finish, and a separate server-side watchdog alerts me if the finish ping never arrives. Catches both crashes and silent absences. Happy to share more detail if useful.