LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   var cron log file (https://www.linuxquestions.org/questions/linux-newbie-8/var-cron-log-file-765076/)

Markus_87 10-28-2009 11:55 AM

var cron log file
 
Hi. Is there an opportunity to write STDERR message to the /var/cron/log file when a job fails to execute? Or only the return codes can be written?

Tinkster 10-28-2009 02:27 PM

Hi,

welcome to LQ!

Cron is quite flexible, but you'll normally get the output of commands e-Mailed
rather than written to logs. What distro are you using?


Cheers,
Tink

Markus_87 10-28-2009 02:35 PM

Tink, I am using Solaris 10. I want that the STDERR stream be caught by cron and written somewhere. In my situation, e-mailing is not an appropriate sollution.

chrism01 10-28-2009 08:27 PM

Normally you'd just re-direct as per normal eg

5 5 25 * * /home/me/myprog >/home/me/myprog.log 2>&1

If cron itself has an issue, it usually emails the crontab owner or root, which you can read with cli prog mailx (or mail).
See also /var/cron/log.


All times are GMT -5. The time now is 06:10 AM.