I have made the timelapse.sh executable with chmod +x and tested it: the script works fine, but I can't get the script working using crontab. Crontab is running, the camera is connected and the script generates the correct output. Can anyone help me?
The timelpase.sh:
Code: Select all
#!/bin/bash
# script for creating a timelapse video with rapistill and store it in /home/pi$
# START AND END TIME ARE PUT IN CRONTAB
# the webpages used as sourced for information are listed at the end of this fi$
DATE=$(date +"%Y-%m-%d_%H:%:M:%S")
sudo raspistill -o /home/pi/picam/$DATE.jpg
Code: Select all
# sunrise: at every minute past every hour from 5 through 8
# sunset: at every minute past every hour from 18 through 21
* 5-8 * * * /home/pi/timelapse.sh 2>&1
* 18-21 * * * /home/pi/timelapse.sh 2>&1