LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Closed Thread
 
Search this Thread
Old 05-10-2007, 02:40 AM   #1
sridhar_dct3
Member
 
Registered: May 2007
Location: india,chennai
Distribution: debian,ubuntu linux
Posts: 30

Rep: Reputation: 15
crontab log does not exist


hi friends,

I have a problem in crontab. The crontab daemon is running fine . All the configurations are right. But the command was not executed . There is no log output in /var/log/cron
also . /var/log/cron file does not exist .

Then where is the log file . I am running as root user.

help me .

cat /var/run/crond.pid
3855

ps ax | grep -i cron
3855 ? Ss 0:00 /usr/sbin/cron
8853 pts/1 S+ 0:00 grep -i cron

# m h dom mon dow command
01 23 * * * /bin/tar -zcvf /tmp/file.tgz /root 1> /tmp/backup.log 2>/tmp/backup.err
 
Old 05-10-2007, 03:00 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Hi,

(Cron) Logging is done by the syslog daemon and configured in /etc/syslog.conf.

As root:

Make a backup before editing /etc/syslog.conf (cp /etc/syslog.conf /etc/syslog.conf.org). In case something goes wrong.

Add the following line: cron.* -/var/log/cron and restart the syslog daemon (from the /etc/rc.d/init.d directory, probably ./sysklogd restart, but this depends on your distro). You probably need to create the cron logfile (touch /var/log/cron) too before restarting the syslog daemon.

Hope this helps.

Last edited by druuna; 08-18-2007 at 04:41 AM.
 
Old 05-22-2007, 12:16 AM   #3
sridhar_dct3
Member
 
Registered: May 2007
Location: india,chennai
Distribution: debian,ubuntu linux
Posts: 30

Original Poster
Rep: Reputation: 15
hi,

it's great , I just made a entry in /etc/syslog.conf , then created the /var/log/crontab.log file .

it worked fine . thanx
 
Old 05-22-2007, 02:25 AM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,226

Rep: Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022
Also, if anything goes wrong you'll usually get an email in the root mail file.
 
Old 03-25-2009, 05:04 PM   #5
ehsanch
LQ Newbie
 
Registered: Mar 2009
Posts: 1

Rep: Reputation: 0
in debian it is
# nano /etc/rsyslog.conf
and then
# /etc/init.d/rsyslog restart
 
1 members found this post helpful.
Old 09-19-2011, 03:29 AM   #6
backpacker77
LQ Newbie
 
Registered: Sep 2011
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
Hi,

(Cron) Logging is done by the syslog daemon and configured in /etc/syslog.conf.

As root:

Make a backup before editing /etc/syslog.conf (cp /etc/syslog.conf /etc/syslog.conf.org). In case something goes wrong.

Add the following line: cron.* -/var/log/cron and restart the syslog daemon (from the /etc/rc.d/init.d directory, probably ./sysklogd restart, but this depends on your distro). You probably need to create the cron logfile (touch /var/log/cron) too before restarting the syslog daemon.

Hope this helps.
Bonjour,

Petite question

Sous Ubuntu, faut-il modifier le fichier syslog.conf ou rsyslog.conf du coup ?

Merci !!
 
Old 09-19-2011, 03:56 AM   #7
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,458

Rep: Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941
Please, don't resurrect an old thread, better to start a new one. Also please post in English language, in agreement with the LQ rules you accepted upon registration.
 
1 members found this post helpful.
  


Closed Thread


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
/var/log/boot.log doesn't exist??? big_gie Fedora 5 05-17-2008 05:44 AM
Apache 2.2 error log stating file doesnt exist, when it clearly does. sarina1975 Linux - General 5 08-20-2006 05:56 PM
Opennms Logs - where are web.log, web_rtc.log and webauth.log referenced? not_much_of_a_guru Linux - Networking 0 07-12-2006 10:28 AM
Help with crontab log error magyartoth Linux - General 5 12-21-2004 01:05 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM


All times are GMT -5. The time now is 04:29 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration