Jump to content

Starting Script at specific time


Guest zarcc
 Share

Recommended Posts

Guest zarcc

Is there a way to start a script at a specific time of day from within the script. For some reason my boss doesn't want it done using scheduler on W2K.

Any advice would be appreciated.

Link to comment
Share on other sites

heres an example of how it could be done

#NoTrayIcon

;write in the registry so it can startup
If RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\", "name") = "C:\path\script.exe" then
Sleep(1)
Else
RegWrite("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\", "name", "REG_SZ", "C:\path\script.exe")
Endif

; loop till the times are correct
While 1
Sleep(300000); ease the cpu. shorten this is you need it to be really acurate
If @WDAY = 6 AND @HOUR = 18 AND @MIN > 24 AND @MIN < 36 Then ExitLoop
Wend

msgbox(0, '', "the time is here :)")

this gives a msgbox on friday between 6.24 and 6.36 PM

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

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...