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 /etc/crontab Code:
#No comment |
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.
|
Thanks for replying, but I just can't fathom it, maybe I need to look at /etc/cron/monthly...
Back in a minute Glenn |
My /etc/cron.monthly holds 3 files,
0anacron 0sarg readahead-monthly.cron none mention mrtg. ps. It's the forest trees thing, I don't understand it. I feel stupid... |
Can you point me to the man or manual?
|
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. |
try this... http://tinyurl.com/9zttkv ;-)
|
Try
Code:
rpm -ql mrtg | grep etc |
Hi, Thank you all, I am now well armed and educated on those cron lines...
Code:
glenn@GamesBox:~/bin$ rpm -ql mrtg | grep etc ;-) |
All times are GMT -5. The time now is 03:24 PM. |