I have a script that I run locally on my laptop, which polls a server and if certain criteria are met, it sends an email. I guess like a heartbeat app of sorts.
The server is a Raspberry Pi, it has a public IP address which is all working fine.
Id like to host the python script on Heroku, so that it can run without my laptop having to be on the local network or always running.
Does anyone have experience of Heroku to show me how I can have the script hosted and running constantly?
My other query is that free tiers of Heroku go to sleep after 30 mins, so would essentially stop the script until getting an http request and spin up the instance once again.
Trying to find some form of elegant solution.
Many thanks for any advice you can give,
All the best,
Simon
Different approachs would be:
1- Cloud Functions

Create lambda function in a cloud provider with your python code (free tier elegible)
Trigger that function every once in a while

2- Get VM on Cloud

Go to AWS, GCP, etc
Get a free tier VM
Run server from there
Heroku - Python integration