Browse Source

增加定时任务的上限,解决多日触发的问题(临时)

daniel 1 year ago
parent
commit
6b3ae12439
2 changed files with 2 additions and 2 deletions
  1. 1 1
      QMT/230504_real_time.py
  2. 1 1
      QMT/qmt_real_hlfx.py

+ 1 - 1
QMT/230504_real_time.py

@@ -382,7 +382,7 @@ if __name__ == '__main__':
 
     scheduler = BlockingScheduler()
     scheduler.add_job(func=job_func, trigger='cron', day_of_week='0-4', hour='09', minute='40',
-                      timezone="Asia/Shanghai")
+                      timezone="Asia/Shanghai", max_instances = 5)
     # scheduler.add_job(func=job_func, trigger='cron', day_of_week='0-4', hour='12', minute='35',
     #                   timezone="Asia/Shanghai")
     try:

+ 1 - 1
QMT/qmt_real_hlfx.py

@@ -361,7 +361,7 @@ if __name__ == '__main__':
 
     scheduler = BlockingScheduler()
     scheduler.add_job(func=job_func, trigger='cron', day_of_week='0-4', hour='09', minute='25',
-                      timezone="Asia/Shanghai")
+                      timezone="Asia/Shanghai", max_instances = 5)
     # scheduler.add_job(func=job_func, trigger='cron', day_of_week='0-4', hour='13', minute='00',
     #                   timezone="Asia/Shanghai")
     try: