Python Forum

Full Version: Run School Bell by Google Calendar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all,

I have a Raspberry Pi running a simple python code controlling a relay that rings a bell. It currently works great but I would like to make it easy to change the schedule via google calendar. The way it works now is just by using crontab and scheduling Monday-Friday.


What I have in mind is to create a google calendar with all the days off listed. I hope that python can read this and know not to ring the bell on those days.

How I would hope it would work is:

On the pi there would be a pre-made schedule to run Monday-Friday. Before ringing it checks the calendar for that day to see if it should ring which could be marked on the calendar as OFF. If it reads off it doesn't ring for that day.

The Bell needs to be on time so it would be best if it would check only once early in the morning to see if it should ring or not that day.

Thanks for the help.
Here's a timer class that might prove useful: https://python-forum.io/Thread-Multi-thr...imer-Class