Skip to main content

Timeline for Running python script on power up

Current License: CC BY-SA 3.0

8 events
when toggle format what by license comment
Mar 7, 2017 at 17:24 comment added Jacobm001 @mnt: That sounds like you added it to the .baschrc file instead of crontab...
Mar 7, 2017 at 17:18 comment added joan @mnt I don't know. I added the following line to my (pi user) crontab @reboot echo "hello" >>/home/pi/cronfile and the file was created before I logged in (I checked the file time-stamp).
Mar 7, 2017 at 16:51 comment added mnt Thanks for your replies Joan, when I sudo reboot. Then the program only runs when I sign in via ssh. Is this some automatic log in issue? I cant seem to enable it using raspi-config
Mar 7, 2017 at 16:49 comment added joan Yes, provided you have updated the crontab correctly and your script is suitable to run in the background (i.e. doesn't expect keyboard input and doesn't write results to the screen).
Mar 7, 2017 at 16:45 comment added mnt Ive just tried this raspberrypi-spy.co.uk/2013/07/… after I do sudo reboot, should the program run when I plug and unplug the raspberry pi?
Mar 7, 2017 at 16:39 comment added joan Many ways. Search for how to launch programs at start-up. Personally I'd add the script to crontab using the @reboot line.
Mar 7, 2017 at 16:31 comment added mnt Sorry my bad. How do I set it so that it will run 10-30 seconds after it receives power?
Mar 7, 2017 at 16:29 history answered joan CC BY-SA 3.0