Make computer automatically wake up?

If your a member of codenstuff then this is the main place to be. Get together..talk..chat and ponder. Have fun. Chill out. Play games.
11 posts Page 1 of 2
Contributors
Vikhedgehog
VIP - Donator
VIP - Donator
Posts: 812
Joined: Fri Nov 05, 2010 6:24 pm

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 :D

Thanks, vik

By the way, no, the server wont run when the computer is in sleep mode
User avatar
Martin
Supreme VIP
Supreme VIP
Posts: 369
Joined: Sat Aug 01, 2009 12:26 pm

why cant you leave the pc on? just turn the power off for the screen
Image
Vikhedgehog
VIP - Donator
VIP - Donator
Posts: 812
Joined: Fri Nov 05, 2010 6:24 pm

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.
MANSQN
VIP - Donator
VIP - Donator
Posts: 159
Joined: Sat Sep 17, 2011 11:33 pm

can you not just wait till you're parents are a sleep, then just turn it back on!?
Vikhedgehog
VIP - Donator
VIP - Donator
Posts: 812
Joined: Fri Nov 05, 2010 6:24 pm

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
User avatar
Martin
Supreme VIP
Supreme VIP
Posts: 369
Joined: Sat Aug 01, 2009 12:26 pm

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?
Image
User avatar
clanc789
Coding Guru
Coding Guru
Posts: 786
Joined: Tue Nov 02, 2010 4:45 pm

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.
Practice makes perfect!

VIP since: 6-10-2011
Vikhedgehog
VIP - Donator
VIP - Donator
Posts: 812
Joined: Fri Nov 05, 2010 6:24 pm

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/
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

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
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

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.
11 posts Page 1 of 2
Return to “Codenstuff boardroom”