LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-28-2009, 12:55 PM   #1
Markus_87
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Rep: Reputation: 0
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?
 
Old 10-28-2009, 03:27 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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
 
Old 10-28-2009, 03:35 PM   #3
Markus_87
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Original Poster
Rep: Reputation: 0
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.
 
Old 10-28-2009, 09:27 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What the %$#@ is pam_unix (cron:session) doing every ten minutes? (/var/log/auth.log) CoffeeKing!!! Linux - Security 3 02-05-2009 08:07 AM
/var/log/messages and /var/log/cron not working sigkill Linux - Software 6 08-09-2008 02:08 PM
cron cluttering my /var/log/messages frater Linux - Software 6 07-23-2008 03:00 PM
cron 'test' message in my /var/log/messages file visaris Linux - Newbie 1 12-13-2004 05:03 PM
/var/log/cron question Llwyd Linux - General 1 12-12-2002 02:11 PM


All times are GMT -5. The time now is 08:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration