-
Notifications
You must be signed in to change notification settings - Fork 21
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. For example, you will add a single line that looks something like the following (with your specific 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.
Initial State (https://www.initialstate.com)
(c) 2019 Initial State Technologies, Inc.