Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

4
Periodically Running Script on Raspberry Pi
Post Body

Hello everyone,

I'm building a remote temperature and humidity monitor for my attic using a Raspberry Pi Zero W and an Enviro HAT. My intention is to take a reading every 15 minutes and save it to a database for visualizing later. My question is... Is it better to write a time.sleep(900) in a While loop and have the program continuously run or should I have it take the reading and then end the program and set a cron job to run every 15 minutes? Regardless of the method, I'll set it up so the script runs automatically on boot in case the pi shuts off but which would be more stable?

Author
Account Strength
90%
Account Age
5 years
Verified Email
Yes
Verified Flair
No
Total Karma
1,193
Link Karma
13
Comment Karma
1,180
Profile updated: 3 days ago
Posts updated: 1 year ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 years ago