It seems the windows AT command and the windows SCHTASKS command do
not allow for the management of the attribute that will allow the
machine to resume from a sleep state.
Instead, you would use the SetFlags method on
TASK_FLAG_SYSTEM_REQUIRED in the IScheduledWorkItem interface.
TASK_FLAG_SYSTEM_REQUIRED is 0x1000 or 4096 decimal.
SetFlags Method of the IScheduledWorkItem Interface:
TASK_FLAG_SYSTEM_REQUIRED
The work item causes the system to be resumed, or awakened, if the
system is running on battery power. This flag is supported only on
systems that support resume timers.
UI says "Wake the computer to run this task"
I hope this post turns out to be useful to folks.
--Dale--
This is likely how you got to this post in the first place:
schtasks.exe (Windows schtasks command)
at.exe (Windows AT command)
win32 api
windows scheduled tasks
create scheduled tasks from the command line that wakes the computer
to run the task
create scheduled tasks programatically that wakes the computer to run
the task
command line task scheduling that wakes the computer to run the task
power management
resume the computer to run the task
wake the computer to run the task
awaken the computer to run the task
WIN32_ScheduleJob WMI obect
NetScheduleJobEnum
NetScheduleJobDel
NetScheduleJobAdd
netapi32.dll