Will the planned Java application work when Windows is in sleep mode?

If I run a Java application, it initiates and does some work, then goes into the sleep stream for an hour, then wakes up in an hour and does some more work ...

But my computer is running Win7, and after 15 minutes of inactivity it will go into sleep mode, so my question is: after an hour I started a Java application, if I do not touch the PC and it goes into sleep mode, my Java application can still wake up and do my job, and if the Win7 computer works like that, the screen turns on again [because in standby mode Win7 the screen turns off]?

+6
java windows sleep-mode
source share
4 answers

Normal Thread.sleep () will not call the computer from sleep mode.

However, when registering a task with the Windows Task Scheduler, you can choose "wake up the computer to complete this task." Upon entering hibernation, Windows will inform the motherboard of the time of the next registered wake-up task.

+7
source share

How is this possible if Windows is not working? There may be some tricks available with automatic wakeups supported by the motherboard, but when the computer is in sleep mode, from the point of view of the OS and programs, it can also be turned off.

EDIT: look for other answers that point to workarounds using some of the Windows APIs and tools (which supposedly work with the motherboard to provide timely wakeups).

+3
source share

I know the WHS client component allows your computer to wake itself up to perform client-side backups. In fact, you can specify a way to wake the computer from sleep to perform a backup that is controlled by WHS . How they cope with this task is not through Java, and I am sure that they have different hooks in the OS, since there is still power in sleep mode. Here's an article that talks about detecting a standby transition and preventing it in Java / C ++ and may contain a value for what you are trying to achieve another. Alternatively, you can use WOL to wake the computer remotely.

+2
source share

If your computer is asleep, everything is paused. Including any custom applications that you might want to run.

0
source share

All Articles