瀏覽代碼

try the schedule library (container problem)

marton levente 11 月之前
父節點
當前提交
da891774dd
共有 1 個文件被更改,包括 15 次插入0 次删除
  1. 15 0
      scheduled.py

+ 15 - 0
scheduled.py

@@ -0,0 +1,15 @@
+'''Created 3 Oct 2023 Levi'''
+import time
+import schedule
+
+import mail_alert
+
+schedule.every(5).seconds.do(mail_alert.mail_alert)
+schedule.every(5).seconds.do(mail_alert.mail_alert2)
+schedule.every(5).seconds.do(mail_alert.mail_alert3)
+
+
+if __name__ == '__main__':
+    while True:
+        schedule.run_pending()
+        time.sleep(1)