Panetta
Panetta

Reputation: 79

Crontab for shell not working

I have a program named all.sh in the directory home/hmm

52 08 * * * /usr/bin/sh /home/hmm/all.sh

It doesn't run. I know where is something wrong in the /usr/bin/sh. any help?

Upvotes: 0

Views: 28

Answers (2)

user615501
user615501

Reputation: 144

Your path to the sh executable is wrong. In your interactive shell type: "which sh" to get the actual location and use that in your crontab entry. (It's probably /bin/sh)

Upvotes: 1

Taras
Taras

Reputation: 582

Have you tried to run it manually? Do you see any error messages when you run it in terminal? Please also check /usr/bin/sh -n /home/hmm/all.sh to check bash script syntax.

Upvotes: 0

Related Questions