Browse Source

每月1日备份表

李莎 2 năm trước cách đây
mục cha
commit
1819c5ec20
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      main.py

+ 2 - 2
main.py

@@ -29,7 +29,6 @@ end_date_month = (datetime.datetime.now() + dateutil.relativedelta.relativedelta
 
 # start_date_month = "20220903"
 # end_date_month = "20230201"
-days = get_day_1(start_date_month,end_date_month)
 def job():
     if datetime.date.today().day != 1:
         print("%s 等待1号执行程序"%datetime_now())
@@ -48,5 +47,6 @@ def job():
 
 schedule.every().day.at("08:30").do(job)
 while True:
+    days = get_day_1(start_date_month, end_date_month)
     schedule.run_pending()
-    time.sleep(1)
+    time.sleep(30)