Running a Python script on start up


We’ve been working with our students to develop weather stations using GrovePi kits. We’ve tried every method here to make the scripts run automatically, so that we can start the weather station in headlessly, but none of them seem to work. The python scripts write data from the sensors to a CSV file.

Please help.

Hi @jbalcombe,

There has got to be something wrong with what you do, otherwise it would work. Since I’m a fan of systemD can you show us the service file you’re using and the python script you’re trying to run?

You can also check if the service is up and running by using systemctl status your-service-here.service. Or you can also try to follow the logs by typing in sudo journalctl -u your-service-here.service -f.

Lastly, please use the formatting tools in order differentiate code from text.

Thank you!