You are reading a single comment by @useless and its replies.
Click here to read the full conversation.
-
Scripts run from cron aren't inheriting your interactive shell setup, and often have a different PATH. You can find the absolute path of each of the programs it's complaining about by typing eg.
$ which blockdev
in your shell, and then use the result (
/sbin/blockdev
or whatever it happens to be) explicitly in the script. Or just add that directory to PATH inside the script.
Cheers all for the assistance.
It looks like I have a few issues. First one is that the full command wasn't being executed for some reason so however I tried to log it I wasn't getting any output. The command actually being executed was this :
Should stuff be in quotes or something? I've not seen any reference to that before.
When I shorten down the output so the command does run I get the following error in my log file
Not sure why it runs when I run it directly but not using cron. I can't find any reference to it from googling the script.