Page 1 of 2
Make computer automatically wake up?
Posted: Mon Feb 13, 2012 3:33 pm
by Vikhedgehog
Hi
Is there a way or an app where i can set a time (1 hour) and the computer goes into sleep mode and then turns back on in 1 hour and continues running. I need this because i would like it to go into sleep mode when my parents tell me to shut it down and when everyone is sleeping make it automatically turn on so everyone can play on the server
Thanks, vik
By the way, no, the server wont run when the computer is in sleep mode
Re: Make computer automatically wake up?
Posted: Mon Feb 13, 2012 3:34 pm
by Martin
why cant you leave the pc on? just turn the power off for the screen
Re: Make computer automatically wake up?
Posted: Mon Feb 13, 2012 4:09 pm
by Vikhedgehog
Martin wrote:why cant you leave the pc on? just turn the power off for the screen
The fan will be making noise so the parents will notice.
Re: Make computer automatically wake up?
Posted: Mon Feb 13, 2012 4:28 pm
by MANSQN
can you not just wait till you're parents are a sleep, then just turn it back on!?
Re: Make computer automatically wake up?
Posted: Mon Feb 13, 2012 4:40 pm
by Vikhedgehog
MANSQN wrote:can you not just wait till you're parents are a sleep, then just turn it back on!?
Thats the problem, i can't
Re: Make computer automatically wake up?
Posted: Mon Feb 13, 2012 4:41 pm
by Martin
Vikhedgehog wrote:MANSQN wrote:can you not just wait till you're parents are a sleep, then just turn it back on!?
Thats the problem, i can't
why not?
Re: Make computer automatically wake up?
Posted: Mon Feb 13, 2012 4:54 pm
by clanc789
Coz he doesnt want to wait till they sleep and keep up all that time I guess. I dont know if this is possible, dont think so.
Re: Make computer automatically wake up?
Posted: Mon Feb 13, 2012 4:54 pm
by Vikhedgehog
Martin wrote:Vikhedgehog wrote:MANSQN wrote:can you not just wait till you're parents are a sleep, then just turn it back on!?
Thats the problem, i can't
why not?
if i turn it off and then go sleeping someone will check it again >.<
Edit: i found out that its pretty easy to do
This is one of the apps
http://www.lifsoft.com/
Re: Make computer automatically wake up?
Posted: Mon Feb 13, 2012 9:34 pm
by muttley1968
it should be possible if you were to find a way to program in the bios it is possible though my dad did it for me many years ago on a laptop but in revers it would tern off at a sertin time and only tern back on at anouther
Re: Make computer automatically wake up?
Posted: Sat Feb 18, 2012 10:50 pm
by mandai
You can use this code to hibernate and then resume after an hour:
Code: Select all <DllImport("kernel32.dll")> Shared Function CreateWaitableTimer(ByVal lpTimerAttributes As IntPtr, ByVal bManualReset As Boolean, ByVal lpTimerName As String) As IntPtr
End Function
<DllImport("kernel32.dll")> Shared Function SetWaitableTimer(ByVal hTimer As IntPtr, ByRef pDueTime As Long, ByVal lPeriod As Integer, ByRef pfnCompletionRoutine As IntPtr, ByVal lpArgToCompletionRoutine As IntPtr, ByVal fResume As Boolean) As Boolean
End Function
Private Sub btnSetWake_Click(sender As System.Object, e As System.EventArgs) Handles btnSetWake.Click
Dim hTimer As IntPtr = CreateWaitableTimer(IntPtr.Zero, True, Nothing)
Dim dueTime As DateTime = DateTime.Now.AddHours(1)
Dim dueLong As Long = dueTime.ToFileTime()
Dim running As Boolean = SetWaitableTimer(hTimer, dueLong, 0, IntPtr.Zero, IntPtr.Zero, True)
If running Then
MsgBox("Will wake up at " & dueTime)
'Application.SetSuspendState(PowerState.Hibernate, False, False)
'uncomment to allow hibernate
Else
MsgBox("Error starting timer")
End If
End Sub
'Note: the program needs to stay running or the timer will be cancelled.