If I start a Java app, it initiates and does some work then goes to thread sleep for an hour, then wake up after an hour and does some more work ...
But my PC is running Win7 and after 15 minutes of inactivity, it will go into sleep mode, so my question is : an hour from I started the Java app, if I don't touch the PC, and it goes into sleep mode, will my Java app still be able to wake up and do its work, and if so will the Win7 PC wake up with the screen turned on again [ because in Win7 sleep mode the screen turns off ] ?
A normal Thread.sleep() will not wake up the computer from sleep mode.
However, when registering a task with the Windows task scheduler, you can choose "wake the computer to run this task". When going to sleep mode, Windows will tell the motherboard the time of the next registered wake-up task.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With