-   Mandriva (
-   -   How do I start a cron job that starts on the 22nd of the month, mrtg. (

GlennsPref 02-06-2009 04:28 AM

How do I start a cron job that starts on the 22nd of the month, mrtg.
How do I start a cron job that starts on the 22nd of the month.

The cron job is MRTG Bandwidth monitor.

I have check the /usr/share/docs/mrtg but I have not found anything relating
to when the graph starts.

At the moment it starts promptly at the 1st day of each month. Which is
nice, but it's hard to figure if I have gone over my limit or not, going
over is 25c/Mb

An extra cd's worth can be quite expensive.

So I'm sure this is a cron job, but I can't see the trees for the forest,
could someone point me in the right direction?

Cheers Glenn


#No comment

#No comment

#No comment

#No comment

01 * * * *        root        nice -n 19 run-parts --report /etc/cron.hourly

#No comment
02 4 * * *        root        nice -n 19 run-parts --report /etc/cron.daily

#No comment
22 4 * * 7        root        nice -n 19 run-parts --report /etc/cron.weekly

#No comment
42 4 1 * *        root        nice -n 19 run-parts --report /etc/cron.monthly

#No comment
0-59/10 * * * *        root        /usr/bin/mrtg /etc/mrtg/mrtg.cfg

# File generated by KCron the Thursday 09 October 2008 22:11.

acid_kewpie 02-06-2009 05:04 AM

well you'd just have an entry of 01 0 22 * * whatever is running on the first is probably dropped into the /etc/cron.monthly directory.

GlennsPref 02-06-2009 05:21 AM

Thanks for replying, but I just can't fathom it, maybe I need to look at /etc/cron/monthly...

Back in a minute


GlennsPref 02-06-2009 05:25 AM

My /etc/cron.monthly holds 3 files,


none mention mrtg.

ps. It's the forest trees thing, I don't understand it.

I feel stupid...

GlennsPref 02-06-2009 05:29 AM

Can you point me to the man or manual?

ArfaSmif 02-06-2009 06:05 AM

Do a "man 5 crontab" - this will give you the appropriate man page. However all you have to do is the following.

Edit the /etc/crontab file above and comment out the existing "mrtg" line, then insert the following line

1 1 22 * * root /usr/bin/mrtg /etc/mrtg/mrtg.cfg

Save the file. this will start the mrtg job at 1 minute past 1am on the 22nd of each month. You can modify the first two numbers "1 1" to suit yourself. These are the minute and hour numbers respectively.

Hope this helps.

acid_kewpie 02-06-2009 06:13 AM

try this... ;-)

colucix 02-06-2009 07:24 AM


rpm -ql mrtg | grep etc
to find out. Maybe in /etc/cron.d?

GlennsPref 02-06-2009 06:59 PM

Hi, Thank you all, I am now well armed and educated on those cron lines...


glenn@GamesBox:~/bin$ rpm -ql mrtg | grep etc

Sorry for appearing lazy, it's been a long week.


All times are GMT -5. The time now is 12:25 PM.