Python Tutorial: Write a Script to Monitor a Website, Send Alert Emails, and Reboot Servers @coreyms
Python Tutorial: Write a Script to Monitor a Website, Send Alert Emails, and Reboot Servers  @coreyms
Uploaded March 2019 | Updated November 2026, 4 days ago
In this Python Programming Tutorial, we're going to be looking at a real-world example of writing a script to monitor a website. If the website doesn't return a successful response for any reason then we will send an email and reboot the web server. Let's get started...

The code from this video (with added logging) can be found at:
bit.ly/monitor-script

Google Account Settings:
myaccount.google.com/lesssecureapps
myaccount.google.com/apppasswords

Requests Video - youtu.be/tb8gHvYlCFs

Environment Variables (Windows) - youtu.be/IolxqkL7cD8
Environment Variables (Mac and Linux) - youtu.be/5iWhQWVXosU

Try/Except Video - youtu.be/NIWwJbo-9_8

F-String Video - youtu.be/nghuHvKLhJA

Crontab Video - youtu.be/QZJ1drMQz1A


✅ Support My Channel Through Patreon:
patreon.com/coreyms

✅ Become a Channel Member:
youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join

✅ One-Time Contribution Through PayPal:
goo.gl/649HFY

✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey's Public Amazon Wishlist
http://a.co/inIyro1

✅ Equipment I Use and Books I Recommend:
amazon.com/shop/coreyschafer

▶️ You Can Find Me On:
My Website - coreyms.com
My Second Channel - youtube.com/c/coreymschafer
Facebook - facebook.com/CoreyMSchafer
Twitter - twitter.com/CoreyMSchafer
Instagram - instagram.com/coreymschafer

#Python
Python Tutorial: Write a Script to Monitor a Website, Send Alert Emails, and Reboot ServersPython Tutorial: Pathlib - The Modern Way to Handle File PathsPython Tutorial: Zip Files - Creating and Extracting Zip ArchivesPython FastAPI Tutorial (Part 16): AWS S3 and Boto3 - Moving File Uploads to the CloudPython Tutorial: Pipenv - Easily Manage Packages and Virtual EnvironmentsSublime Text 3: Setup, Package Control, and SettingsMatplotlib Tutorial (Part 7): Scatter Plots5 Common Python Mistakes and How to Fix ThemPython Pandas Tutorial (Part 2): DataFrame and Series Basics - Selecting Rows and Columns
Corey Schafer |

Python Tutorial: Write a Script to Monitor a Website, Send Alert Emails, and Reboot Servers

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER