Create and render a cube in python from the commandline?
add
bpy.ops.render.render(animation=True) 

at your end of your python code
Basically you've done all right - the cube will be created. You just forgot to tell Blender to render it out.