How to rotate object and render with a script
After some trial and error I found that this python script works for me:

import bpy, math

knob = bpy.data.objects["MyBlenderKnob"]
knob.rotation_mode = 'XYZ'

rotate_by = 4.21875   #How many degrees to rotate the knob for every step
start_angle = 45      #What angle to start from

for x in range(1,65):
    angle = (start_angle * (math.pi/180)) + (x*-1) * (rotate_by * (math.pi/180))
    knob.rotation_euler = ( 0, 0, angle )

    bpy.context.scene.render.filepath = "/Users/myfolder/KnobFrame%d.png" % (x)
    bpy.ops.render.render(write_still=True, use_viewport=True)


It grabs my blender object called "MyBlenderKnob" and rotates it 4.21875° on the Z-axis, then it renders it according to the current render-settings in the project. Then it saves the files in "myfolder".

Beautiful! A real timesaver.