How can I debug a crontab job that's failing with "opening terminal unknown"?

Question

Grade: Education Subject: Support
How can I debug a crontab job that's failing with "opening terminal unknown"?
Asked by:
77 Viewed 77 Answers

Answer (77)

Best Answer
(260)
To debug, redirect the standard output and standard error of your cron job to a log file. For example, `* * * * * /path/to/your/script.sh > /tmp/cron.log 2>&1`. Examine this log file for more detailed error messages from the script or the commands it executes.