Can I run a C++ program when the Pc is on sleep mode

Hey there i have that question that i think it could help also some others (who knows!?) so i have a laptop and i want to run a specific program at a specific time BUT that time since none of my colleges nor me we are at work the laptop is with the screen closed (its not been shut just sleep[i think thats how you call it my mind is frozen now] ) so i was wondering if there is a way to wake up the pc and run that program. The thing is that i know it can be done but i dont know what lib to use so i was wondering if any of you knows that stuff.

The program that i want to run its going to be running constatly the whole time cause i want that to be at the start up folder so im sure that even when the pc its going to be on sleep the program will be on the background

Thanks for your time i wish i will also help others with my question.

Last edited on
the thing is that something like the SetThreadExecutionState wouldnt help cause the pc is already in sleep and also it's going multiple times the day on sleep cause we turn the screen down. Except if every time we turn the screen down it's not sleeping it just stays on then i suppose it could help. hmmm i dunno yet
When your laptop enters sleep / hibernation mode, all threads / processes are suspended. No program can run during sleep mode.
Why don't you just change your laptop's energy settings and disable the automatic power-saving state?
Topic archived. No new replies allowed.