Shutdown V-Core

Good afternoon people,
I would like to know if someone can help me with a function to call the Shutdown function when printing is finished and correctly turn off the respberry. I ask because I'm using the M81 to turn off the power relay and thus turn off the vcore, but with that it ends up corrupting the moonraker file. So I needed to add a function in the Config.cfg file calling the Shutdown after printing finishes and after 10 seconds call gcode M81. So there's time to turn off raspberry without corrupting the files.
I really appreciate your help.
Happy year 2023 to all of us.
Was this page helpful?