Jump to content

So I built this solar powered weather station


G+_Tom Dempsey
 Share

Recommended Posts

There are two ways you can do that. The best way is to edit (if exists) or create an /etc/rc.local file and put the python command line in that file. There is a lot of information on-line about /etc/rc.local file configuration. The other way is to create a bash script to test to see if the weather station program is running like run a command "ps -ae | grep python" and if the python process is not running start it up. This command would going into your crontab. You can edit your crontab by executing crontab -e and set a schedule for the bash script to run. I do these command via the command line interface. I hope this helps.

Link to comment
Share on other sites

Hope your able to get it running. One point I forgot to mention. If you execute a bash script in cron, make sure that you use the chmod command to change privileges so your bash script has at least execute privilege or it won't run. Being my Raspberry Pi runs on a closed internal network, I usually just set my privileges so everyone has read, write, execute privileges "chmod 777 {your script name}. Let me know how you make out and good luck.

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...