1

I have to run code on the boot of raspberrypi. I am doing using this by below command

@reboot while true; do timeout 600 python3 TestProgram.py; sleep 4; done &

My program is not running. Please suggest me some corrections. Thanks in advance.

nathancy
  • 42,661
  • 14
  • 115
  • 137
Manu
  • 177
  • 9

1 Answers1

0

There is some codes on this link.

https://www.raspberrypi.org/documentation/linux/usage/cron.md

@reboot python /home/pi/myscript.py

You need to save your python file in the folder '/home/pi/'

sauceishere
  • 326
  • 5
  • 15
  • Thanks sir. I was not giving the path of the file. But, it is required to put & at last always. I donot know why? – Manu Apr 10 '19 at 00:52