luojiehua 4 лет назад
Родитель
Сommit
7113af4067
1 измененных файлов с 6 добавлено и 2 удалено
  1. 6 2
      jobs/exportJobs.py

+ 6 - 2
jobs/exportJobs.py

@@ -1,7 +1,11 @@
 #coding:utf8
 #coding:utf8
 
 
-from utils.Utils import sendEmail,getCurrent_date
+import sys
 import os
 import os
+sys.path.append(os.path.join(os.path.dirname(__file__),".."))
+
+from utils.Utils import sendEmail,getCurrent_date
+
 import datetime
 import datetime
 import time
 import time
 from export.exportDocument import exportDocument_medicine,list_df_columns
 from export.exportDocument import exportDocument_medicine,list_df_columns
@@ -29,7 +33,7 @@ def export_medicine_friday():
 
 
 def job_medicine_friday():
 def job_medicine_friday():
     _scheduler = BlockingScheduler()
     _scheduler = BlockingScheduler()
-    _scheduler.add_job(export_medicine_friday(),"cron",day_of_week='fri',hour=18)
+    _scheduler.add_job(export_medicine_friday,"cron",day_of_week='fri',hour=18)
     _scheduler.start()
     _scheduler.start()