The script does appear to run but only for 5 - 6 hours after which it seems to stop taking photos. I know that the rpi has more than enough space to save the photos on so that shouldn't be an issue.
Code: Select all
# Note: This script runs at startup (listed in /etc/rc.local) #!/bin/bash MINUTES=720 SECONDS_TO_RUN=$((60 * MINUTES)) DELAY=25 while [ "$SECONDS" -lt "$SECONDS_TO_RUN" ]; do DATE=$(date +"%H_%M_%S") raspistill --nopreview -o /home/pi/timelapse/$DATE.jpg sleep $DELAY done
The only thing which comes to mind is the internal $seconds variable - does this exclude time during which the 'sleep' command is running?
Many thanks in advance