LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 11:55 AM   #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, 02:27 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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, 02: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, 08:27 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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



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 07:07 AM
/var/log/messages and /var/log/cron not working sigkill Linux - Software 6 08-09-2008 01:08 PM
cron cluttering my /var/log/messages frater Linux - Software 6 07-23-2008 02:00 PM
cron 'test' message in my /var/log/messages file visaris Linux - Newbie 1 12-13-2004 04:03 PM
/var/log/cron question Llwyd Linux - General 1 12-12-2002 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:09 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
Open Source Consulting | Domain Registration