How can I update the render border while rendering an animation?

I’ve just written a quick function that dynamically moves the render border using these properties, where scene = bpy.context.scene:

scene.render.border_min_x
scene.render.border_min_y
scene.render.border_max_x
scene.render.border_max_y

I’m pleased to say it works perfectly in the 3D view! However, when rendering an animation, the render border does not update with the script. I have tried appending the function to various application handlers including render_pre and scene_update_post, but the border stays in the same place. How can I get Blender to update the render border between frames?