# How to script blender to quit after rendering is complete Mac OS10.13

I've got a script that automatically renders and saves the render, but I'd also like to have Blender quit when the render and save is completed. Since I will be running renders overnight, I'd prefer to have it shut off when finished.

I've checked out the alarm_and_shutdown script by Metelskiy and Nikitin, but it's for windows.

Any ideas?

Turns out that the command is bpy.ops.wm.quit_blender()

• Please don't edit the answer into your question. If you found a solution we encourage to post it as a self answer below. As a bonus you might get some reputation points – Duarte Farrajota Ramos Dec 6 '18 at 4:21
• Recommend looking into running from the command line. docs.blender.org/manual/en/latest/render/workflows/… – batFINGER Dec 6 '18 at 14:19
• Last time I posted as an answer I got reprimanded for not editing the post. Confused now. – gwfami Dec 7 '18 at 5:15