Rendering a specific set of frames in one job
It's possible loop over a list of the desired frames, set the correct frame and render it within a Python script.

I didn't manage to automatically enumerate frames according to the Blender Output Panel documentation, so I set the filename manually for each frame and restore the original value afterwards.

The following script should render all even frames as well as all frames that end in a five.

import bpy

scene = bpy.context.scene
tmp_filename = scene.render.filepath

all_frames = range(scene.frame_start, scene.frame_end + 1)

for f in [f for f in all_frames if f%2 == 0 or f%10 == 5]:
    scene.frame_set(f)
    scene.render.filepath = '//frame_{:04d}'.format(f)  # frame_0000 etc.
    bpy.ops.render.render(write_still=True)

scene.render.filepath = tmp_filename


You can select the desired frames by list comprehension like above or use Python's filter function.

The “render with script” approach will make Blender unresponsive during the job, but I think the operating system won't shut the process down unless you tell it to do so, i.e. click on the “Blender is not responding” dialog box.