Dear all,
currently i am facing an issue.
I have a script which should be in a loop until midnight to do not process further before 00:00.
If it is for example 00:05:23 am the script should finish and the process should continue.
The script is executed everyday at different times. Could be 07:00 pm, could be 11:34 pm could also be on the next day around 00:32 am.
The only think which is sure that the script is not activated again before 16:00 (04:00 pm) in the afternoon
My script:
: SET &Time# = sys_time()
: IF &Time# < "160000"
: p "EXECUTE OBJECT XXXX"
: ELSE
: WHILE &Time# >= "160000"
: p "Too early to EXECUTE OBJECT XXXX"
: WAIT 1800
: SET &Time# = sys_time()
: ENDWHILE
: ENDIF
What i want to achieve is to be in the loop until &TIME# is < "160000" (04:00 pm
As the script is always activated after 160000 (04:00 pm) i thought i could be an idea to check sys_time < "160000" and that is the case after midnight. (f.e. 000523 (00:05:23)
The script is not ending the loop. I think it is because of the different days.
If i modify the script with times on the same day its working fine.
Hope someone has an advice for me.
Thanks in advance.
regards,
Benedikt