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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-10-2007, 02:40 AM
|
#1
|
|
Member
Registered: May 2007
Location: india,chennai
Distribution: debian,ubuntu linux
Posts: 30
Rep:
|
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
|
|
|
|
05-10-2007, 03:00 AM
|
#2
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,718
|
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.
|
|
|
|
05-22-2007, 12:16 AM
|
#3
|
|
Member
Registered: May 2007
Location: india,chennai
Distribution: debian,ubuntu linux
Posts: 30
Original Poster
Rep:
|
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
|
|
|
|
05-22-2007, 02:25 AM
|
#4
|
|
Guru
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.4, Centos 5.9
Posts: 15,026
|
Also, if anything goes wrong you'll usually get an email in the root mail file.
|
|
|
|
03-25-2009, 05:04 PM
|
#5
|
|
LQ Newbie
Registered: Mar 2009
Posts: 1
Rep:
|
in debian it is
# nano /etc/rsyslog.conf
and then
# /etc/init.d/rsyslog restart
|
|
|
1 members found this post helpful.
|
09-19-2011, 03:29 AM
|
#6
|
|
LQ Newbie
Registered: Sep 2011
Posts: 1
Rep: 
|
Quote:
Originally Posted by druuna
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 !!
|
|
|
|
09-19-2011, 03:56 AM
|
#7
|
|
Moderator
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.4 OpenSuSE 12.2
Posts: 9,897
|
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.
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:23 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|