03-15-2009, 07:49 AM
Better use task scheduler.
function scheduled every day at 6 pm (probably "start when idle" should be checked in task properties):
shutdown 4
function scheduled every day at 10 am ("wake..." checked in task properties):
wait 0 M
The wait for mouse click command does not allow Windows to hibernate again if not using mouse or keyboard for several minutes. Or show message box.
------------------------------
SetWaitableTimer can wait for an absolute time too. If t is positive. Anyway, some calculations needed.
function scheduled every day at 6 pm (probably "start when idle" should be checked in task properties):
shutdown 4
function scheduled every day at 10 am ("wake..." checked in task properties):
wait 0 M
The wait for mouse click command does not allow Windows to hibernate again if not using mouse or keyboard for several minutes. Or show message box.
------------------------------
SetWaitableTimer can wait for an absolute time too. If t is positive. Anyway, some calculations needed.