Sign in to follow this  
Followers 0
Guest zarcc

Starting Script at specific time

4 posts in this topic

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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thanks I will try that.

Share this post


Link to post
Share on other sites

That looks like it is going do it for me. Thanks for the quick reply.

Share this post


Link to post
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
Sign in to follow this  
Followers 0