Преглед на файлове

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)