Network Management

last person joined: yesterday 

Keep an informative eye on your network with HPE Aruba Networking network management solutions
Expand all | Collapse all

Airwave - cronjob keeps disappearing

This thread has been viewed 0 times
  • 1.  Airwave - cronjob keeps disappearing

    EMPLOYEE
    Posted Dec 01, 2014 06:52 AM

    I have setup a monthly cronjob on Airwave that keeps disappearing.

     

    Initially I add it in with 'crontab -e'.  After it lists fine with 'crontab -l', but then a day or two later it is no longer listed when I run a 'crontab -l'.  The script itself is located in /var/airwave/custom.

     

    The job is set to run on the first day of every month.  Initially I had it set to run every week, which was fine, but then it was changed to be every month, and now it keeps disappearing.

     

    Anyone else seen similar behaviour or set this sort of thing up on Airwave?



  • 2.  RE: Airwave - cronjob keeps disappearing

    EMPLOYEE
    Posted Dec 01, 2014 03:58 PM

    Are you adding your cronjob inside or outside of the AMP flags?  If it's inside the flags, then I would expect this behavior since any upgrade or applying patch cleans up the crontab within the AMP cron entries flags.

     

    Custom cron entries should be added outside of the flagged area (I typically add before).

     



  • 3.  RE: Airwave - cronjob keeps disappearing

    EMPLOYEE
    Posted Dec 01, 2014 04:08 PM

    By flags, do you mean between "# BEGIN AMP CRON ENTRIES" and "# END AMP CRON ENTRIES" ?

     

    In any case, this is happening under normal operation without any upgrade or patch.  We add it....it is still there a few hours later.....next day or two when I chack again, it is gone.

     

    Maybe something to do with the nightly maintenance.  I will follow your suggestion from now on though Rob....that is something I didn't know.

     

    :-)



  • 4.  RE: Airwave - cronjob keeps disappearing
    Best Answer

    EMPLOYEE
    Posted Dec 01, 2014 04:34 PM

    Yeah, it would look something like this:

     

    rob ~]# crontab -e

    ~~~~~crontab output~~~~~~~~

    # keep qlogs alive for debugging

    0 0 * * * /usr/local/airwave/bin/qlog enable amon_dump_raw

     

    # BEGIN AMP CRON ENTRIES
    15 04 * * * /usr/local/airwave/bin/nightly_maintenance_exclusive /usr/local/airwave/bin/nightly_maintenance
    # END AMP CRON ENTRIES



  • 5.  RE: Airwave - cronjob keeps disappearing

    Posted Dec 01, 2014 05:06 PM
    Mike, if you put your CRON entry within the # BEGIN AMP CRON ENTRIES and # END AMP CRON ENTRIES and you make a change to the AMP setup page, I believe it erases it as Rob mentions previously or maybe it doesn't need a change to the AMP setup page.

    Put it outside of the # and it should be fine.

    I am currently running a customized version of nightly_maintenance which runs outside of the # tags.


  • 6.  RE: Airwave - cronjob keeps disappearing

    EMPLOYEE
    Posted Dec 01, 2014 05:08 PM

    Got it.  That's probably what happening here.

     

    Thanks for the tip