Timeline for Running a Python script at startup
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
S Apr 14, 2019 at 22:14 | history | suggested | myhd | CC BY-SA 4.0 |
fix typo, edit for brevity
|
Apr 14, 2019 at 19:38 | review | Suggested edits | |||
S Apr 14, 2019 at 22:14 | |||||
Jul 27, 2018 at 14:49 | comment | added | Amine Harbaoui | @Huy.PhamNhu Answering your question : The Pi will run this program at bootup, and before other services are started. If you don’t include the ampersand and if your program runs continuously, the Pi will not complete its boot process. The ampersand allows the command to run in a separate process and continue booting with the main process running. | |
Jul 29, 2017 at 3:21 | comment | added | Aura |
@goldilocks could you please explain why do I need to add & ? Because when I use without it, everything still working as expected.
|
|
Feb 20, 2015 at 13:15 | comment | added | goldilocks♦ |
"as you wrote it in your question" Not quite -- you don't need sudo as rc.local runs root. You should also specify the complete path to the script, obviously. You should also add & at the end so that the script forks, e.g. /path/to/foobar.py & .
|
|
Dec 27, 2012 at 0:07 | vote | accept | Vlad Schnakovszki | ||
Dec 27, 2012 at 0:07 | comment | added | Vlad Schnakovszki | It worked! I must add that setting the permissions for the script and rc.local back to 755 (read/write/execute) is a must. Not sure if both need this setting, but it worked for me. Thanks a lot for the help! | |
Dec 26, 2012 at 20:42 | history | answered | ikku | CC BY-SA 3.0 |