|
|
|
@ -163,7 +163,10 @@ class O365_User:
|
|
|
|
format(next_routine_until.ctime()), width=54, title="Info")
|
|
|
|
format(next_routine_until.ctime()), width=54, title="Info")
|
|
|
|
pause.until(next_routine_until.timestamp())
|
|
|
|
pause.until(next_routine_until.timestamp())
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
|
|
|
|
print("1")
|
|
|
|
|
|
|
|
print(repr(interval))
|
|
|
|
if isinstance(interval, int):
|
|
|
|
if isinstance(interval, int):
|
|
|
|
|
|
|
|
print("2")
|
|
|
|
logging.info(
|
|
|
|
logging.info(
|
|
|
|
"The next routine will be executed at {0}".format(time.ctime(time.time() + interval)))
|
|
|
|
"The next routine will be executed at {0}".format(time.ctime(time.time() + interval)))
|
|
|
|
if is_interactive:
|
|
|
|
if is_interactive:
|
|
|
|
@ -172,12 +175,18 @@ class O365_User:
|
|
|
|
width=54, title="Info")
|
|
|
|
width=54, title="Info")
|
|
|
|
pause.until(time.time() + interval)
|
|
|
|
pause.until(time.time() + interval)
|
|
|
|
if isinstance(interval, tuple):
|
|
|
|
if isinstance(interval, tuple):
|
|
|
|
|
|
|
|
print("3")
|
|
|
|
if not len(interval) == 2:
|
|
|
|
if not len(interval) == 2:
|
|
|
|
raise ValueError("The interval has a bad format.")
|
|
|
|
raise ValueError("The interval has a bad format.")
|
|
|
|
(min_interval, max_interval) = interval
|
|
|
|
(min_interval, max_interval) = interval
|
|
|
|
random_interval = random.randint(min_interval if min_interval <= max_interval else max_interval,
|
|
|
|
random_interval = random.randint(min_interval if min_interval <= max_interval else max_interval,
|
|
|
|
max_interval if min_interval <= max_interval else min_interval)
|
|
|
|
max_interval if min_interval <= max_interval else min_interval)
|
|
|
|
|
|
|
|
print(random_interval)
|
|
|
|
logging.info(
|
|
|
|
logging.info(
|
|
|
|
"The next routine will be executed at {0}".format(
|
|
|
|
"The next routine will be executed at {0}".format(
|
|
|
|
time.ctime(time.time() + random_interval)))
|
|
|
|
time.ctime(time.time() + random_interval)))
|
|
|
|
|
|
|
|
if is_interactive:
|
|
|
|
|
|
|
|
dlg.infobox(
|
|
|
|
|
|
|
|
"The next routine will be executed at {0}".format(time.ctime(time.time() + random_interval)),
|
|
|
|
|
|
|
|
width=54, title="Info")
|
|
|
|
pause.until(time.time() + random_interval)
|
|
|
|
pause.until(time.time() + random_interval)
|
|
|
|
|