Davewerld
Posts: 8
Joined: Sun Nov 17, 2013 5:25 pm

lost in the tutorial

Mon Apr 06, 2015 8:06 pm

Hi all,

I'm just trying to follow on the time lapse tutorial ( http://www.raspberrypi.org/learning/timelapse-setup/) which seems like it should be simple. I'm struggling all the way. I got the camera to work fine, but once you write the bash script, that's where I go wrong. I couldn't get the chmod +x camera.sh to work, it rejected my permissions. I finally "solved that by using "sudo chmod +x camera.sh , of course after that following along, yielded the new block, ./camera.sh That would reject me with bash ./ Is a directory. Finally typing sudo bash camera.sh got the script to run. So then when I try edit my crontab to schedule this script to run every minute, I am supposed to add the line * * * * * /home/pi/camera.sh 2>&1 This didn't do anything, so I tried adding sudo bash before camera, etc.. Nothing seems to make this work. I looked at various sites and tried using */1 * * * * /home/pi/camera.sh 2>&1 and every combination of it I could methodically do.

My questions are, why can't I just run this bash script like the tutorial and why isn't cron running along with it? I am also a bit lost on the 2>&1 part on the cron tab suggestion, I can't find information that makes that make sense to me. I'm sure I am doing something so basically wrong, but I just don't see it.

Thanks,

Dave

Davewerld
Posts: 8
Joined: Sun Nov 17, 2013 5:25 pm

Re: lost in the tutorial

Mon Apr 06, 2015 8:28 pm

Update, found using sudo chmod a+x camera.sh allows the unit to run as an executable. It now all works, thanks for looking, it was simple enough.

Return to “Beginners”