|
@@ -61,12 +61,12 @@ if __name__ == '__main__':
|
|
|
eng_b = create_engine('mysql+pymysql://root:r6kEwqWU9!v3@localhost:3307/qmt_stocks?charset=utf8')
|
|
|
eng_f = create_engine('mysql+pymysql://root:r6kEwqWU9!v3@localhost:3307/qmt_stocks_front?charset=utf8')
|
|
|
|
|
|
- download_data(stocks, eng_b, eng_f)
|
|
|
+ # download_data(stocks, eng_b, eng_f)
|
|
|
|
|
|
- # scheduler = BlockingScheduler()
|
|
|
- # scheduler.add_job(func=download_data, trigger='cron', hour='15', minute='45', args=[stocks, eng_b, eng_f],
|
|
|
- # timezone="Asia/Shanghai")
|
|
|
- # try:
|
|
|
- # scheduler.start()
|
|
|
- # except (KeyboardInterrupt, SystemExit):
|
|
|
- # pass
|
|
|
+ scheduler = BlockingScheduler()
|
|
|
+ scheduler.add_job(func=download_data, trigger='cron', hour='15', minute='45', args=[stocks, eng_b, eng_f],
|
|
|
+ timezone="Asia/Shanghai")
|
|
|
+ try:
|
|
|
+ scheduler.start()
|
|
|
+ except (KeyboardInterrupt, SystemExit):
|
|
|
+ pass
|