What Bob suggests is exactly what I did prior to Scheduler and my now taking morning dome flats (which requires everything to remain powered on and cold).
At the end my shutdown script used to place the computer in hybernate.
Console.PrintLine("shell: " + (ex.message ? ex.message : ex));
I shut off the power by using a USB powerstrip that senses when the computer is asleep and then cuts power.