Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FormatTime startTime, 20051231020000, HH ; 2005 Dec 31 02:00:00; the actual date does not matter
- FormatTime endTime, 20051231160000, HH ; 2005 Dec 31 16:00:00; the actual date does not matter
- Loop {
- FormatTime currTime, , HH ; If the second value is blank then it takes the current time
- if (startTime < currTime and currTime < endTime) {
- ; Do your stuff
- }
- Sleep % 30 * 60 * 1000 ; stop execution for 30 mins (can be reduced as needed)
- }
- ; Alternatively, if the "your stuff" needs to repeat:
- FormatTime startTime, 20051231020000, HH
- FormatTime endTime, 20051231160000, HH
- Loop {
- FormatTime currTime, , HH
- if (startTime < currTime) {
- Loop {
- ; Do your stuff
- if (currTime > endTime) break
- Sleep 20 * 1000 ; 20 seconds (can be reduced as needed)
- }
- }
- Sleep % 30 * 60 * 1000 ; stop execution for 30 mins (can be reduced as needed)
- }
Advertisement
Add Comment
Please, Sign In to add comment