Sunday, April 14, 2019

Cron Running in Terminal but not Executing

When you try a command, it may run successfully in the terminal. But when you add the same command to cron, it may not run.
The reason is that cron does not use 'bash' shell and it lacks the PATH info. Whereas the terminal uses 'bash' and it has the right path environment set for all commands. So when you add the command in the cron, add the command with full path like /usr/bin/COMMAND.

No comments:

Post a Comment