w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to keep run Python Program in Background on Raspberry Pi after terminate ssh

I would recommend running your python program in a cron reboot job.

To edit your root cronjobs use

sudo crontab -e

And add the line

@reboot sudo python full_path/MyProjekt/sensorReader.py

Then reboot your pi with:

sudo reboot

And then confirm that your process is running:

ps -aux | grep python




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.