The reasons why a cron job may fail is really very large. Most common reasons may be,
- Syntax error
- Using executable without proper path
- Using a shell variable which is not defined in cron environment
- Attempt to open a GUI without specifying
DISPLAY
And so on...
Sometimes it is really difficult to understand which error is preventing the job to be executed. Is there a way to detect error(s) in a cron jobs?