Looking for crontab scripts or API extensions

Hi (first post, pls be friedly if this is old stuff, I did not find anything here, maybe too stupid?)

Situation: Wifey is angry about the Printer Sounds that rob her precious beauty sleep at night.
So I thought, at a certain time in the evening I should PAUSE ongoing jobs and RESUME them when it is safe again in the morning.
No big deal, cron is my friend for decades already and the needed commands could easily be found in the API (/api/job command:pause, action:pause|resume).
It works, but there is still large room for improvements because this way, the temps are kept up, the fans are howling, and power consumption is still quite high. Would be a waste to let it run overnight this way.

Tests showed, that it is bold to just turn off everything via command and hope that "resume" will be nice and restore the old values before it really resumes printing. No way, the printer stays cold and just flips around moving but printing nothing anymore :sleepy:

So I was looking into the API for some "PUSH" and "PULL" commands, but sadly, I did not find anything alike.

Of course, I could do it the hard way, reading current values, storing them somewhere, pausing the printer, shutting off motors, heater and bed and restore those values, wait for heating up and finally resume.

This is a bit error-prone because I do not know WHAT I need to save and restore. Likely that I miss something important.

So I am asking if somebody already has made a skript or plugin to fulfill my needs, or if there is a chance in the future to add new commands to the API that do these jobs ?

Doing this has a high probability of failure. You would be better served by moving the printer out of (or away from) the bedroom. Alternatively (or in addition to), an enclosure for the printer could help reduce the sound level.

Aside from temperature issues, the probability of success depends on where the "pause" happens, i.e. some gcode commands don't "pause" and "resume" very well. Doing this asyncronously from cron could be an additional problem.

A possible solution might be to create a plugin that responds to "conditional pause" commands inserted in the gcode (at appropriate points). The condition would check an external input (existance of a file, for instance) and if it's there, the pause happens and if it's not, the print continues. The cron job would just create the external input.

I said aside from temperature issues but these may be the biggest challenge. Filament doesn't always like being cooled and heated so the likelihood of oozing and or jamming is going to be much higher.

Of course the printer is not in the bedroom, it is one floor above and in its (shut) enclosure. But wifes tend to be picky (I dont hear the printer at all) :face_with_symbols_over_mouth:

Elegoo says, this printer is capable of resuming and all my manual tests so far (without powering it off or stopping the heat) worked flawlessly.
Now I will even dare to let it cool of and reheat later on before I continue...