Hello, I have been unsuccessful in modifying a script I use to wait 2 hours from the start of the script before it attempts to repeat. Can one of you help me? I can change the script around to accommodate it if needed.
The script will log through various toons, and when finished wait until 2 hours has passed before attempting to log through those toons again.
I was thinking the start of the loop could somehow calculate what time it would be in 2 hours. The second could possibly be another loop that does nothing until time is past the previously calculated 2 hours.
The script will log through various toons, and when finished wait until 2 hours has passed before attempting to log through those toons again.
Code:
variable int X=0
variable int TotalX=2
function main(int TempNum=9){
echo ${Time}
while 1 ;Start main loop that will repeat logging through toons
{
X:Set[0]
;--Need to calculate what time it will be in 2 hours.
while ${X:Inc} <= ${TotalX} ;Log through toons to accomplish something
{
echo Stuff that takes time
wait 600
}
;--Need a way to hold here until the 2 hours has passed.
}
}