Skip to main content

You can just run sudo crontab -e and add the @reboot prefix to the command. For example if you wanted to run bash /home/pi/script.sh on boot, simply add @reboot bash /home/pi/script.sh to the end of your crontab file. Remember that crontab is user specific and may require sudo and a full path of execution.

You can just run crontab -e and add the @reboot prefix to the command. For example if you wanted to run bash /home/pi/script.sh on boot, simply add @reboot bash /home/pi/script.sh to the end of your crontab file. Remember that crontab is user specific and may require sudo and a full path of execution.

You can just run sudo crontab -e and add the @reboot prefix to the command. For example if you wanted to run bash /home/pi/script.sh on boot, simply add @reboot bash /home/pi/script.sh to the end of your crontab file. Remember that crontab is user specific and may require sudo and a full path of execution.

Source Link
jeffresc
  • 209
  • 1
  • 5

You can just run crontab -e and add the @reboot prefix to the command. For example if you wanted to run bash /home/pi/script.sh on boot, simply add @reboot bash /home/pi/script.sh to the end of your crontab file. Remember that crontab is user specific and may require sudo and a full path of execution.