Jump to content

Sleep until a specific date then run the program


ReaImDown
 Share

Recommended Posts

I remember about 5 months or so ago someone was asking if there was a way to sleep until a specific time (Date) then run the script...I wrote this up for him, but forgot to post it :) hope this helps someone, cause its useless to me :)

you can push it further by adding year in there too, but thats kind of useless :)...also, it may be benaficial to you if you made it => rather than =

sleep.au3

Edited by ReaImDown
[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]
Link to comment
Share on other sites

I remember about 5 months or so ago someone was asking if there was a way to sleep until a specific time (Date) then run the script...I wrote this up for him, but forgot to post it :) hope this helps someone, cause its useless to me :)

#include<Misc.au3>

Global $Month = 12
Global $Day = 28
Global $Hour = 21
Global $Minute = 49

_Sleep($Month, $Day, $Hour, $Minute)

Func _Sleep($Month = @MON, $Day = @MDAY, $Hour = @HOUR, $Minute = @MIN)
    Do
        If _IsPressed('10') And _IsPressed('be') Then; Shift + >>
            MsgBox(0, "", "Working!")
            ExitLoop
        EndIf
    Until $Month = @MON And $Day = @MDAY And $Hour = @HOUR And $Minute = @MIN
    MsgBox(0, "", "Works")
EndFunc ;==>_Sleep

you can push it further by adding year in there too, but thats kind of useless :D...also, it may be benaficial to you if you made it => rather than =

This is cool :) But would it work if they restart the computer??

code
Link to comment
Share on other sites

This is cool :) But would it work if they restart the computer??

it would if you made the script run on startup, also, you can customize it more by having it read registry entries that contain the date you want it to run and what time, so that way the user can define a time themselves or else it would only work for 1 date...if anyone is clueless as to how to do that, I will write it up quick for them :)

[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]
Link to comment
Share on other sites

Burn CPU Burn!!!

8)

fine add a sleep or 2 in there lol

new I forgot something haha

updated to stop combustion...but I still think its more fun watching it catch fire though :)

Edited by ReaImDown
[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...