I need to run code located /home/pi/Hello_on_startup.py each time RaspberryPi restarts
For that I created hello.conf file in /etc/init/ directory
description "A script controlled by upstart"
author "Anton"
start on runlevel [2345]
stop on runlevel [016]
respawn
exec /home/pi/Hello_on_startup.py`
When I run command sudo start hello I get an answer Unknown job: hello
You need a
script...end script
block in your conf file for it to be recognised, as shown here. Your resultinghello.conf
file would look as follows:There is also a similar question on AskUbuntu.