This commit is contained in:
bvn13 2024-07-20 08:57:22 +03:00
parent 6bcb13479e
commit 4f6762d49a
2 changed files with 3 additions and 3 deletions

View File

@ -50,12 +50,12 @@ if __name__ == "__main__":
def scheduled(): def scheduled():
schedule = None schedule = None
if os.environ['TEST'] == 1: if 'TEST' in os.environ:
schedule = Scheduler() schedule = Scheduler()
schedule.cyclic(dt.timedelta(seconds=10), shkolniy_weather_job) schedule.cyclic(dt.timedelta(seconds=10), shkolniy_weather_job)
else: else:
Scheduler(tzinfo=tz_msk) Scheduler(tzinfo=tz_msk)
schedule.daily(dt.time(hour=7, minute=0, tzinfo=tz_msk), shkolniy_weather_job) schedule.daily(dt.time(hour=9, minute=0, tzinfo=tz_msk), shkolniy_weather_job)
logger.info(schedule) logger.info(schedule)
while True: while True:
schedule.exec_jobs() schedule.exec_jobs()

View File

@ -1 +1 @@
0.2.5 0.2.6