Added begin/rescue inside thread loop

Hopefully fix a bug where the thread dies and cached schedule becomes
out of date by using an empty begin/rescue.