upd
This commit is contained in:
parent
94113e3025
commit
6bcb13479e
10
src/main.py
10
src/main.py
@ -49,9 +49,13 @@ if __name__ == "__main__":
|
|||||||
bot.send_weather(WeatherTask('shkolniy', "{0}".format(shkolniy_weather)))
|
bot.send_weather(WeatherTask('shkolniy', "{0}".format(shkolniy_weather)))
|
||||||
|
|
||||||
def scheduled():
|
def scheduled():
|
||||||
schedule = Scheduler(tzinfo=tz_msk)
|
schedule = None
|
||||||
# schedule.cyclic(dt.timedelta(seconds=10), shkolniy_weather_job)
|
if os.environ['TEST'] == 1:
|
||||||
schedule.daily(dt.time(hour=9, minute=15, tzinfo=tz_msk), shkolniy_weather_job)
|
schedule = Scheduler()
|
||||||
|
schedule.cyclic(dt.timedelta(seconds=10), shkolniy_weather_job)
|
||||||
|
else:
|
||||||
|
Scheduler(tzinfo=tz_msk)
|
||||||
|
schedule.daily(dt.time(hour=7, minute=0, tzinfo=tz_msk), shkolniy_weather_job)
|
||||||
logger.info(schedule)
|
logger.info(schedule)
|
||||||
while True:
|
while True:
|
||||||
schedule.exec_jobs()
|
schedule.exec_jobs()
|
||||||
|
Loading…
Reference in New Issue
Block a user