LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-21-2004, 04:47 PM   #1
shawn_t
LQ Newbie
 
Registered: Feb 2004
Posts: 13

Rep: Reputation: 1
5 minute cron jobs for mrtg and gate_news


I have seen one other posting on a similar subject, but the answer didn't really explain what was going on...

I have the following cron entries every five minutes:

(root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg)
(root) CMD (/usr/lib/sa/sa1 1 1)
(mailman) CMD (/usr/bin/python -S /var/mailman/cron/gate_news)

in /var/log/cron

MRTG is for logging website statistics so I would imagine these are used for that purpose. Is there a way to disable this logging or at least change the frequency?

Can someone give me an explanation of what these are and how to either get rid of them or reduce the frequency?

Thanks in advance.
 
Old 12-21-2004, 06:16 PM   #2
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
The right syntax in crontab is
*/5 * * * * usr/bin/mrtg /etc/mrtg/mrtg.cfg

cron will run the above every 5 minutes. If you want to understand the above syntax it will be something like
0,5,10,15,20,25,30,35,40,45,50,55 * * * * usr/bin/mrtg /etc/mrtg/mrtg.cfg

If you want to disable a schedule place # in the beginning of the line.

Type info crontab at an terminal screen. Then select crontab(5) or other see also entries.

To edit crontab type crontab -e. This will bring up vi and load the crontab for the logged in user.
 
Old 12-22-2004, 01:54 PM   #3
shawn_t
LQ Newbie
 
Registered: Feb 2004
Posts: 13

Original Poster
Rep: Reputation: 1
Thank you for the reply, but I was more interested in what applications configured these cron jobs and where I might change the frequency or even existance.

I am assuming that since mrtg is a webserver statistics application that is was probably set up when I initialized my apache webserver, but I can't be sure. Also, even though the mrtg cron job appears to be owned by root, it doesn't show up in roots crontab job list.

I did find the gate_news job when I ran:
Quote:
crontab -u mailman -l
but it says:
Quote:
DO NOT EDIT THIS FILE - edit the master and reinstall
I investigate further as to where this master is...
 
Old 12-22-2004, 05:23 PM   #4
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
I just told you how to edit the crontab schedule. Type crontab -e at the terminal or at bash prompt. It will open up vi with the crontab schedule for the user you are logged into.

You can edit the master located in /var/log/spool/cron but the changes will not take effect unless you run the crontab utility with the changed file. Using crontab -e or crontab -e -u user is easier than just edit the crontab file and telling crontab to update the schedule for the desire user.

Usually crontab file is in /etc named as crontab.
 
  


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
Cron Jobs XaViaR Linux - General 1 06-23-2005 06:57 PM
problem with cron jobs umk Linux - Newbie 2 01-25-2005 10:14 AM
cron jobs working2hard Linux - Software 0 07-28-2004 05:31 PM
CRON Jobs scottpioso Linux - Software 63 11-28-2003 06:45 PM
cron jobs Zyanid Linux - Software 0 08-27-2002 05:10 AM

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

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