We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9645c40 commit 52172a6Copy full SHA for 52172a6
2 files changed
.github/workflows/run_weekly_auto_notify.yml
@@ -26,4 +26,4 @@ jobs:
26
SENDER_EMAIL: ${{ secrets.SENDER_EMAIL }}
27
SENDER_PASSWORD: ${{ secrets.SENDER_PASSWORD }}
28
RECIPIENT_EMAIL: ${{ secrets.RECIPIENT_EMAIL }}
29
- run: python auto_notify.py
+ run: python auto_notify_weekly.py
auto_notify_weekly.py
@@ -0,0 +1,18 @@
1
+from check_date import check_expiry
2
+from email_send import send_expiry_alert_email
3
+
4
+def main():
5
+ XML_FILE = "data.xml"
6
+ DAYS_THRESHOLD = 30
7
8
+ print("\nChecking expiration dates...")
9
+ near_expiry_list = check_expiry(XML_FILE, DAYS_THRESHOLD)
10
11
+ print("\nSending email if needed...")
12
+ if not send_expiry_alert_email(near_expiry_list):
13
+ print("Failed to send email (if needed).")
14
15
+ print("\nProcess completed.")
16
17
+if __name__ == "__main__":
18
+ main()
0 commit comments