A python script that checks for OINP update every 20s and notify you by sending a text message with Twilio.
Running Environment: Raspberry Pi 3 Model B, Raspbian Linux 4.9, Python 2.7.13
Python Libraries Needed:
- pickle
- urllib3
- BeautifulSoup
- time
- logging
- twilio
Other Utility Needed:
- cron
- Twilio
How to Implement:
- Install Python 2.7 and all libraries/utilities needed
- Put
OINP.py
andOINP.pickle
in a folder of your choice. - Replace all
#
with real values (For privacy reason, I masked my Twilio credentials, phone number and file directories). - Schedule a cron task to run
OINP.py
every 10 mins:*/10 * * * * python ########/OINP.py
- Schedule a cron task to reboot the computer everyday at midnight to prevent crashes:
0 0 * * 0 sudo reboot
- Schedule a cron task to upgrade the computer everyday at 12:01 AM:
1 0 * * * sudo apt-get upgrade && sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove