LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-11-2004, 08:18 AM   #1
hamish
Member
 
Registered: Aug 2003
Location: Edinburgh
Distribution: Server: Gentoo2004; Desktop: Ubuntu
Posts: 720

Rep: Reputation: 30
cron not logging


Hey!

This question has been asked before, and I have seen it on Google, but nothing seems to be helping.

I have ensured that I have the CRONLOG = YES is in the /etc/crontab file.

I have tried putting:
# Log cron stuff
#cron.* /var/log/cron

in my /etc/syslog-ng/syslog-ng.conf file, however, I get a parse error when I try to restart syslog-ng and it fails to start.

here is the entry (which I'm testing atm) from my /etc/crontab
14 14 * * * root cp /root/rsync1/* /root/rsync2/ 2>&1 > /var/log/cron/m00.log

It creates that /var/log/cron/m00.log file fine, but nothing is ever in the log file. I don't know what a cron log file will look like, but I imaging that it will have all sorts of information about what was moved and who owns the job. Nothing is in the log file, despite the fact that it is created.

Also, what is the " 2>&1 > " bit in the crontab line? I copied it from somewhere because I thought that was how to enable logging.

can someone please suggest something for me!

Thanks
Hamish
 
Old 07-11-2004, 09:11 AM   #2
gazza
Member
 
Registered: Jun 2003
Distribution: Mandrake 10.1 Official
Posts: 157

Rep: Reputation: 30
Have you tried uncommenting your :

#cron.* /var/log/cron
 
Old 07-11-2004, 09:15 AM   #3
hamish
Member
 
Registered: Aug 2003
Location: Edinburgh
Distribution: Server: Gentoo2004; Desktop: Ubuntu
Posts: 720

Original Poster
Rep: Reputation: 30
Yeah, when I do that, I get the parse error

H
 
  


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
shell script using /etc/cron.hourly to execute cron.php file? rioguia Programming 3 06-11-2008 08:09 AM
logging daily cron jobs in separate files csmwlee Linux - Newbie 5 10-10-2005 10:30 AM
Syslog logging Cron logins rhoekstra Fedora 4 02-17-2005 02:45 AM
Turn off logging for specific cron job guyk Linux - Software 10 10-24-2004 11:23 PM
cron logging on/of maggi Linux - General 1 05-13-2003 05:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:11 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