Automatically skip frozen frames during animation render?

I have animation to render in EEVEE, I’m doing it with blender cmd commands because it’s faster, but there’s a problem. For some reason some frames seem to stuck (like “Rendering 1/17 samples” goes forever), if I close it and start again, the same frame renders perfectly fine. It wouldn’t be much of an issue, but I can’t constantly sit in front of my PC and control situation, so I was wondering if there’s a way to automatically skip frames that take too long to render?