From c97e5a695cc2e2e2013d29092152c15cf34f6cb7 Mon Sep 17 00:00:00 2001 From: Lei PAN Date: Wed, 8 Jun 2022 10:08:19 +0200 Subject: [PATCH] correction on scheduler.py --- scheduler.py | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/scheduler.py b/scheduler.py index 9d36b36..f5a22d6 100644 --- a/scheduler.py +++ b/scheduler.py @@ -2,39 +2,17 @@ from apscheduler.executors.pool import ThreadPoolExecutor, ProcessPoolExecutor from apscheduler.schedulers.blocking import BlockingScheduler from check_results import check_results -from main import start_book -from wait_for_sms import start_waiting_sms - - -def waiting_for_sms_job(): - start_waiting_sms(1, 32) def check_results_job(): check_results() - -def start_book_appointment(): - start_book(1, 31) - - -def start_waiting_sms_job(sched): - # sched.add_job(start_book_appointment, 'cron', day_of_week='mon-sat', hour='10', - # minute='30', - # misfire_grace_time=10, - # second='0', timezone='Europe/Paris', max_instances=1) - sched.add_job(waiting_for_sms_job, 'cron', day_of_week='mon-sat', hour='21', - minute='15', - misfire_grace_time=10, - second='0', timezone='Europe/Paris', max_instances=1) - - def start_check_results_job(sched): # sched.add_job(start_book_appointment, 'cron', day_of_week='mon-sat', hour='10', # minute='30', # misfire_grace_time=10, # second='0', timezone='Europe/Paris', max_instances=1) - sched.add_job(check_results(), 'cron', day_of_week='mon-sat', hour='21', + sched.add_job(check_results, 'cron', day_of_week='mon-sat', hour='21', minute='15', misfire_grace_time=10, second='0', timezone='Europe/Paris', max_instances=1)