git clone https://github.com/yourusername/SSL-checker.git
cd SSL-checkerBefore scheduling periodic checks, you can test the script to ensure it's working as expected:
python3 check_ssl.py- Open the crontab editor:
crontab -e- Add the following line to run the script daily at a specific time (e.g., 3:00 PM every Monday):
Schedule a cron job based on the remaining days
* * * * *
│ │ │ │ └───── day of the week (0 - 7, both 0 and 7 represent Sunday)
│ │ │ └─────── month (1 - 12)
│ │ └───────── day of the month (1 - 31)
│ └──────────── hour (0 - 23)
└─────────────── minute (0 - 59)
0 15 * * 1 /usr/bin/python3 /path/to/SSL-checker/check-ssl.py- Replace
/usr/bin/python3with the path to your Python interpreter. - Replace
/path/to/SSL-checker/check-ssl.pywith the actual path to your script.
- Save and exit the crontab editor.
-
Open the Windows Task Scheduler.
-
Create a new task and configure it to run
python3with the script's full path as the argument. Set the schedule according to your preferences.
The script will now run periodically as scheduled, checking the SSL certificates of the specified websites. When a certificate is about to expire within the defined threshold, you can send an email alert.
This project is licensed under the MIT License - see the LICENSE file for details.