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
Last revisionBoth sides next revision
run_program_at_boot_using_cron [2017/01/31 17:14] – [Run Program at Boot using Cron] walkeradminrun_program_at_boot_using_cron [2017/01/31 22:15] – [Execution Rights] walkeradmin
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.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1