[Yum-devel] Making yum-cron send mail only if something changed
skvidal at fedoraproject.org
Thu Sep 29 04:41:19 UTC 2011
On Wed, 2011-09-28 at 17:38 -0400, seth vidal wrote:
> On Wed, 2011-09-28 at 22:38 +0300, Ville Skyttä wrote:
> > On 09/28/2011 10:10 PM, seth vidal wrote:
> > > myjob 2>&1 | nag-once myjob 1w
> > >
> > > it takes the output, compares it to the last run of the 'myjob' id and
> > > if the content is the same and the last time it emitted a message is
> > > less than time listed (1week) then it doesn't output anything.
> > >
> > > If the content changes or more than a week has passed - then it emits
> > > the content.
> > >
> > > I know it's not yum-cron specific but it is somewhat related.
> > Sounds great! I'd be very interested in taking a look when you have
> > something ready.
> not completed but a nice start:
> I need to convert times like 7h 4d, etc instead of just taking
> 'seconds' :)
> and I should probably add an option to dump to stderr or stdout.
added the time parsing thing
and I made it work properly if you don't specify a time - only
outputting if the output changes.
More information about the Yum-devel