Fswebcam cron: device or resource busy

I am trying to get a webcam snapshot on a Raspberry Pi every minute. So I wrote a script:

NOW=$(date +"%H-%M-%S") fswebcam -r 640x480 /home/pi/$NOW.jpg

When I run it on the command line, for example /home/pi/webcam_script

, it works fine. Then I add the task to cron with crontab -e

:

0-59 * * * * /home/pi/webcam_script >> cronlog 2>&1

      

As a result, no pictures will be taken. The file cronlog

displays the following error message:

Error selecting input 0
VIDIOC_S_INPUT: Device or resource busy

      

So what is wrong and how can I automatically get images from the webcam

+3
cron raspberry-pi


source to share


No one has answered this question yet

Check out similar questions:

764
How can I list all cron jobs for all users?
4
raspberry pi motion webcam "data premature end"
2
crontab automated python script won't upload to Dropbox
1
Calling C ++ Script via Cron on Raspberry Pi
1
raspistill does not capture any images when controlled by cron
0
python code via cron job doesn't work
0
Sending email with attachment via cron
0
Another RPi idiot who doesn't understand cron
0
Does the cron job continue to run if the python script crashes?
0
fswebcam stops working after a while



All Articles
Loading...
X
Show
Funny
Dev
Pics