Skip to content

Part 5. Automatically Launch on Boot

jrbail01 edited this page Dec 12, 2016 · 7 revisions

To automatically launch our scripts on boot, we will use crontab.

$ crontab -e

At the end of the file that opens, add the monitor_reboot script and the launch_process script. Specify the full path.

@reboot python /home/pi/weather/monitor_reboot.py && /home/pi/weather/launch_process.sh

Notice the monitor_reboot script is followed by "&&". This specifies that the monitor_reboot script should complete before the next command runs. If there is a power outage, it make take a few minutes for your network connection to be restored. After the delays specified in the monitor_reboot script expire, status updates will be sent to your dashboard and your process will be launched.

<< Part 4: Monitor a Reboot - Part 6: Process Dashboard >>

Clone this wiki locally