Its really simple to write blender python scripts:
import bpy bpy.ops.wm.open_mainfile(filepath="blabla.blend") bpy.ops.export_scene.obj(filepath="blabla.obj")
save this script as script.py and run script from commandline
blender -P script.py
thats basically it.