Joey
Joey

Reputation: 23

Raspberry crontab script running

I'm trying to run a command by cron in Raspbian.

If I run ./sec_cam.sh, than my script runs, If I try to run it via crontab every 5 min, than nothing happens.

crontab -e shows me the followings:

*/5 * * * * ./sec_cam.sh

Did I configure the crontab wrong? Thx in advance

Upvotes: 0

Views: 454

Answers (1)

mnagel
mnagel

Reputation: 6854

scripts started from a cronjob are not setup with your usual environment, especially not with your current working directory (referenced by the . in ./sec_cam.sh). so to make this work you should specify a full path name like /home/user/sec_cam.sh

Upvotes: 1

Related Questions