User Tools

Site Tools


run_program_at_boot_using_cron

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
run_program_at_boot_using_cron [2017/01/31 17:12] – [Run Program at Boot using Cron] walkeradminrun_program_at_boot_using_cron [2023/03/09 22:35] (current) – external edit 127.0.0.1
Line 3: Line 3:
 \\  \\ 
 \\  \\ 
-{{:pocket_watch.jpg?300|}}+{{:pocket_watch.jpg?200|}}
 \\  \\ 
  
Line 19: Line 19:
 \\  \\ 
 To avoid putting loads of commands in to Cron, its best to group them all in to a file, then just reference that file in Cron. For this example we will make a file called <color red>launcher.sh</color>. To avoid putting loads of commands in to Cron, its best to group them all in to a file, then just reference that file in Cron. For this example we will make a file called <color red>launcher.sh</color>.
-\\  
 \\  \\ 
  
Line 64: Line 63:
 sudo chmod 755 launcher.sh sudo chmod 755 launcher.sh
 </file> </file>
-\\ 
  
 ---- ----
Line 108: Line 106:
 @reboot sh /home/pi/launcher.sh >/home/pi/logs/cronlog 2>&1 @reboot sh /home/pi/launcher.sh >/home/pi/logs/cronlog 2>&1
 </file> </file>
-\\  
 \\  \\ 
 When you boot/reboot your Raspberry Pi, this will now run the launcher.sh, and if necessary, output any errors in the logs folder. When you boot/reboot your Raspberry Pi, this will now run the launcher.sh, and if necessary, output any errors in the logs folder.
run_program_at_boot_using_cron.1485882743.txt.gz · Last modified: 2023/03/09 22:35 (external edit)