Guest zarcc Posted April 6, 2005 Share Posted April 6, 2005 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 More sharing options...
w0uter Posted April 6, 2005 Share Posted April 6, 2005 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 More sharing options...
Guest zarcc Posted April 6, 2005 Share Posted April 6, 2005 Thanks I will try that. Link to comment Share on other sites More sharing options...
Guest zarcc Posted April 6, 2005 Share Posted April 6, 2005 That looks like it is going do it for me. Thanks for the quick reply. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now