1 Answer
1

When you run a command from the command line, your entire environment, including your $PATH variable, is available to the command. When it's run from a scheduler, e.g. cron, that's not the case.

So when you write scripts that will be run from any type of schedulare, you should make sure to always include the full path to all commands in the script, or else to start by giving the script a proper $PATH setting.