error471 Posted November 16, 2017 Posted November 16, 2017 (edited) Hello Folks, I would like to run a function at certain times and on a certain day. But I cant figure out how. The script shall run repeatedly every 60 seconds. Here is my very best try: #include <Date.au3> ; 1 = Sun 2 = Mon 3 = Tue 4 = Wed 5 = Thu 6 = Fri 7 = Sat $StartTime = "09:00" $EndTime = "19:00" $CurrentTime = _NowTime(4) Switch @WDAY Case 1,2,3,4,5,6,7 If $CurrentTime >= $StartTime AND $CurrentTime <= $EndTime Then While 1 justdoit() Sleep(60000) WEnd EndIf EndSwitch Edited November 16, 2017 by error471
error471 Posted November 16, 2017 Author Posted November 16, 2017 It works now, I made a quite noobish mistake.
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