In this tutorial, I want to show you, how to simply execute any file on a startup.
First of all place your file, which should be executed later on an accessible folder. I put my files always on the desktop. So that means my path is something like this:
/home/pi/Desktop/start.py
Now let’s create in the same folder a second file, which we name launch.sh and write there the following two commands:
Now save that file and open the terminal.
Type there the following command:
sudo crontab -e
It will may ask you, which editor you want. For this case, you could choose the nano editor.

Now the file will open in the terminal. Scroll down and you will see that this file may only contain comments. Just simply add the following line to your file and save it by pressing Ctrl
+ X
and close it.
Logging
As you might logs
.
Leave a Reply