loop a job - Aix

This is a discussion on loop a job - Aix ; Hello All, I need help on creating a daemon job that will run on the background..this daemon will check failed backups and emails me everytime any of the jobs fails but i want it to email me once.. because it ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: loop a job

  1. loop a job

    Hello All,

    I need help on creating a daemon job that will run on the
    background..this daemon will check failed backups and emails me
    everytime any of the jobs fails but i want it to email me once..

    because it run this in cron every 5 minutes it will email me every 5
    minutes until i reset the job scheduler..


    any ideas, Thanks
    pinoy


  2. Re: loop a job

    On Jul 9, 6:16 pm, pinoy2ser wrote:
    > Hello All,
    >
    > I need help on creating a daemon job that will run on the
    > background..this daemon will check failed backups and emails me
    > everytime any of the jobs fails but i want it to email me once..
    >
    > because it run this in cron every 5 minutes it will email me every 5
    > minutes until i reset the job scheduler..
    >
    > any ideas, Thanks
    > pinoy


    Using the rsct ? Improves your knowledge of AIX as well :-)

    Books: RSCT: Administration Guide, for more information about
    ERRM operations
    Commands: chcondition, lscondition, mkcondresp, mkresponse,
    rmcondition, startcondresp
    Commands: chresponse, lscondresp, mkcondresp, mkresponse,
    rmresponse

    hth
    Hajo


  3. Re: loop a job

    On 10 Jul, 10:45, Hajo Ehlers wrote:
    > On Jul 9, 6:16 pm, pinoy2ser wrote:
    >
    > > Hello All,

    >
    > > I need help on creating a daemon job that will run on the
    > > background..this daemon will check failed backups and emails me
    > > everytime any of the jobs fails but i want it to email me once..

    >
    > > because it run this in cron every 5 minutes it will email me every 5
    > > minutes until i reset the job scheduler..

    >
    > > any ideas, Thanks
    > > pinoy

    >
    > Using the rsct ? Improves your knowledge of AIX as well :-)
    >
    > Books: RSCT: Administration Guide, for more information about
    > ERRM operations
    > Commands: chcondition, lscondition, mkcondresp, mkresponse,
    > rmcondition, startcondresp
    > Commands: chresponse, lscondresp, mkcondresp, mkresponse,
    > rmresponse
    >
    > hth
    > Hajo


    The first time it sends you could touch a file and then subsequent
    loops could test for the existence of this file - easiest achieved
    with a small perl script

    e.g.

    #!/usr/bin/perl

    if (-e $flag) {
    exit;
    } else {
    open(MAIL,"|mail -s\"subject\" $mailname") or die "Can't run mail\n";
    print MAIL "message.\n";
    print MAIL "@list\n";
    close(MAIL);
    system "touch $flag";
    }


  4. Re: loop a job

    pinoy2ser wrote:

    >Hello All,
    >
    > I need help on creating a daemon job that will run on the
    >background..this daemon will check failed backups and emails me
    >everytime any of the jobs fails but i want it to email me once..
    >
    >because it run this in cron every 5 minutes it will email me every 5
    >minutes until i reset the job scheduler..
    >
    >
    >any ideas, Thanks
    >pinoy

    You could get your checking job to append its output into a file
    (every 5 mins) and then have another daily job to email you the
    contents of the file.

    Ted.
    ================================================== ============
    | Ted Linnell |
    | |
    | Nunawading, Victoria , Australia |
    ================================================== ============

  5. Re: loop a job

    On Jul 10, 8:00 am, Ted Linnell wrote:
    > pinoy2ser wrote:
    > >Hello All,

    >
    > > I need help on creating a daemon job that will run on the
    > >background..this daemon will check failed backups and emails me
    > >everytime any of the jobs fails but i want it to email me once..

    >
    > >because it run this in cron every 5 minutes it will email me every 5
    > >minutes until i reset the job scheduler..

    >
    > >any ideas, Thanks
    > >pinoy

    >
    > You could get your checking job to append its output into a file
    > (every 5 mins) and then have another daily job to email you the
    > contents of the file.
    >
    > Ted.
    > ================================================== ============
    > | Ted Linnell |
    > | |
    > | Nunawading, Victoria , Australia |
    > ================================================== ============


    Thank you all for the great info and answers...i really appreciate
    it...

    Regards,
    pinoy


+ Reply to Thread