[rancid] Rancid-discuss Digest, Vol 77, Issue 6

Alan McKinnon alan.mckinnon at gmail.com
Wed Mar 22 21:42:51 UTC 2017


On 22/03/2017 22:02, Jones, Herschel wrote:
> Alan,
>
> Crontab here -
>
> # .---------------- minute (0 - 59)
> # |  .------------- hour (0 - 23)
> # |  |  .---------- day of month (1 - 31)
> # |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
> # |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR
> sun,mon,tue,wed,thu,fri,sat
> # |  |  |  |  |
> # *  *  *  *  * user-name  command to be executed
>
> * 1 * * * /usr/local/rancid/bin/rancid-run #hourly router dump
   ^
This is your problem. It runs every minute when the hour is "1", every 
minute from 01:00 to 01:59

I think you got the hours and minutes column swapped, you probably want

0 * * * * /usr/local/rancid/bin/rancid-run #hourly router dump

to run once an hour, on the hour, every hour.
If you really did want rancid to run once a day at 1am, it is this:

0 1 * * * /usr/local/rancid/bin/rancid-run #hourly router dump

The golden rule of cron is you cannot specify intervals like "every 10 
minutes" or "once a day". You can only give the exact time when a job 
must run. I find it very useful to read the columns as saying for example:

when the big hand is at 0 and the little hand is at 4, then do this :-)





> 50 23 * * * /usr/bin/find /usr/local/rancid/var/logs -type f -mtime +2
> -exec rm {} \;
>
> *Herschel Jones*
> Systems Administrator
> Meridian Brick LLC*
>
> Office: (706) 821-3684
> Mobile: (706) 399-5542
> Fax: (706) 722-4774
> Email: Herschel.Jones at meridianbrick.com
> <mailto:Herschel.Jones at meridianbrick.com>
>
> <http://www.meridianbrick.com/>
>
> 1630 Arthern Road Augusta Georgia 30901
> http://www.meridianbrick.com
>
> * * Meridian Brick, through its affiliated entities Boral Bricks LLC,
> Forterra Brick, LLC, Forterra Brick Ltd./Briques Forterra Ltee. proudly
> serves the United States and Canadian markets.
>
>
> -----Original Message-----
> From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On
> Behalf Of rancid-discuss-request at shrubbery.net
> Sent: Wednesday, March 22, 2017 4:00 PM
> To: rancid-discuss at shrubbery.net
> Subject: Rancid-discuss Digest, Vol 77, Issue 6
>
> Send Rancid-discuss mailing list submissions to
>         rancid-discuss at shrubbery.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://www.shrubbery.net/mailman/listinfo/rancid-discuss
> or, via email, send a message with subject or body 'help' to
>         rancid-discuss-request at shrubbery.net
>
> You can reach the person managing the list at
>         rancid-discuss-owner at shrubbery.net
>
> When replying, please edit your Subject line so it is more specific than
> "Re: Contents of Rancid-discuss digest..."
>
>
> Today's Topics:
>
>    1. Rancid Sending Emails Every 2 Minutes (Jones, Herschel)
>    2. Re: Rancid Sending Emails Every 2 Minutes (heasley)
>    3. Re: Rancid Sending Emails Every 2 Minutes (Alan McKinnon)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 21 Mar 2017 13:43:50 +0000
> From: "Jones, Herschel" <Herschel.Jones at meridianbrick.com>
> To: "rancid-discuss at shrubbery.net" <rancid-discuss at shrubbery.net>
> Subject: [rancid] Rancid Sending Emails Every 2 Minutes
> Message-ID:
>
> <SN1PR14MB0589ECA4E4C2D68DD9A54422883D0 at SN1PR14MB0589.namprd14.prod.outlook.com>
>
> Content-Type: text/plain; charset="us-ascii"
>
> Forgive my newbiness, but hey, I made Rancid work, so that has to say
> something. Only issue I am having is with Rancid spamming our network
> group when there is a router down. It emails like it is supposed to,
> except it does it every ~2 minutes for an hour. That doesn't seem normal
> to me, but I couldn't find anything online about it or how to change it.
>
> Thanks in advance for any advice.
>
> Herschel Jones
> Systems Administrator
> Meridian Brick LLC*
>
> Office: (706) 821-3684
> Mobile: (706) 399-5542
> Fax: (706) 722-4774
> Email:
> Herschel.Jones at meridianbrick.com<mailto:Herschel.Jones at meridianbrick.com>
>
> [http://logo.meridianbrick.com/meridianbrick.jpg]<http://www.meridianbrick.com/>
>
> 1630 Arthern Road Augusta Georgia 30901
> http://www.meridianbrick.com
>
> * * Meridian Brick, through its affiliated entities Boral Bricks LLC,
> Forterra Brick, LLC, Forterra Brick Ltd./Briques Forterra Ltee. proudly
> serves the United States and Canadian markets.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20170321/58f1d453/attachment-0001.html>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 22 Mar 2017 04:24:49 +0000
> From: heasley <heas at shrubbery.net>
> To: "Jones, Herschel" <Herschel.Jones at meridianbrick.com>
> Cc: "rancid-discuss at shrubbery.net" <rancid-discuss at shrubbery.net>
> Subject: Re: [rancid] Rancid Sending Emails Every 2 Minutes
> Message-ID: <20170322042449.GE68376 at shrubbery.net>
> Content-Type: text/plain; charset=us-ascii
>
> Tue, Mar 21, 2017 at 01:43:50PM +0000, Jones, Herschel:
>> Forgive my newbiness, but hey, I made Rancid work, so that has to say
> something. Only issue I am having is with Rancid spamming our network
> group when there is a router down. It emails like it is supposed to,
> except it does it every ~2 minutes for an hour. That doesn't seem normal
> to me, but I couldn't find anything online about it or how to change it.
>
> See OLDTIME in rancid.conf(5) and "state" in router.db(%).  but, 2 mins
> is weird; normally one runs rancid from cron every 1 hour.  maybe you
> have an MTA problem too.
>
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 22 Mar 2017 08:49:12 +0200
> From: Alan McKinnon <alan.mckinnon at gmail.com>
> To: rancid-discuss at shrubbery.net
> Subject: Re: [rancid] Rancid Sending Emails Every 2 Minutes
> Message-ID: <7b754445-e82b-5ab7-b0d4-e47889395f30 at gmail.com>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> On 21/03/2017 15:43, Jones, Herschel wrote:
>> Forgive my newbiness, but hey, I made Rancid work, so that has to say
>> something. Only issue I am having is with Rancid spamming our network
>> group when there is a router down. It emails like it is supposed to,
>> except it does it every ~2 minutes for an hour. That doesn?t seem
>> normal to me, but I couldn?t find anything online about it or how to
> change it.
>
> What's on your crontab?
>
> --
> Alan McKinnon
> alan.mckinnon at gmail.com
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>
> ------------------------------
>
> End of Rancid-discuss Digest, Vol 77, Issue 6
> *********************************************
>
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>


-- 
Alan McKinnon
alan.mckinnon at gmail.com



More information about the Rancid-discuss mailing list