LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-23-2006, 10:42 PM   #1
mschrank99
LQ Newbie
 
Registered: Jun 2006
Posts: 20

Rep: Reputation: 0
where does cron keep it's activity log files?


I just want to know where it keeps track of what commands it executed and when and for what user, I'm having problems with it (again) and I'm trying to figure out if the problem is in cron itself or in the script I am running.

I remember I found this once, but since then I have forgotten. Any help appreciated.

-Matthew
 
Old 10-24-2006, 12:31 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395
Hi,

It depends on the distro used. First thing that comes to mind: /var/cron/log.
Take a look at the cron manpage, it should tell you where (if so) things are logged. You can also look in the 'general' logfile (/var/log/messages on most boxes), depending on how syslog is setup the cron info could be present there.

Hope this helps.
 
Old 10-24-2006, 07:47 AM   #3
mschrank99
LQ Newbie
 
Registered: Jun 2006
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks, it put it in the general log file (/var/log/messages)

Can you think of any reason why cron wouldn't run properly until the clock had hit midnight the next day? b/c cron wasn't running any of the jobs, but then it started doing them as soon as the clock hit midnight.
 
Old 10-24-2006, 09:07 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395
Hi,

Without the actual cronjob (the schedule line, not the actual script) it's kinda hard to give an answer.

Once the cron daemon is running (should be done automatically after every boot) it checks (every 30 secs) the individual cron to see if it needs to kick of a scheduled job.
 
Old 10-24-2006, 07:21 PM   #5
mschrank99
LQ Newbie
 
Registered: Jun 2006
Posts: 20

Original Poster
Rep: Reputation: 0
Oh, I figured out the problem. I was testing cron by choosing the next minute to execute the command in crontab. Well, Cron didn't refresh until 30 seconds later, which was usually after the minute I programmed in had already passed. I chose the second to next minute and it worked.
 
  


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
activity log linuxhippy Slackware 5 11-16-2005 06:55 PM
Cron is not outputting log files... Clubber Lang Linux - Newbie 2 09-27-2004 04:41 AM
suspicious log activity hoedad Linux - Newbie 3 07-26-2004 07:33 AM
dual entries in cron log for cron.daily cpharvey Linux - General 3 02-27-2003 02:30 PM
How to Log eth0 activity? Noffy Linux - Networking 1 03-04-2002 04:26 PM

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

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