Network Management

Reply
Aruba
Posts: 1,285
Registered: ‎08-29-2007

Airwave - cronjob keeps disappearing

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?


If my post is helpful please give kudos, or mark as solved if it answers your post.

ACCP, ACMP, ACMX #294
mclarke@arubanetworks.com
Moderator
Posts: 1,252
Registered: ‎10-16-2008

Re: Airwave - cronjob keeps disappearing

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).

 


Rob Gin
Senior QA Engineer - Network Services
Aruba Networks, a Hewlett Packard Enterprise Company
Aruba
Posts: 1,285
Registered: ‎08-29-2007

Re: Airwave - cronjob keeps disappearing

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.

 

:-)


If my post is helpful please give kudos, or mark as solved if it answers your post.

ACCP, ACMP, ACMX #294
mclarke@arubanetworks.com
Moderator
Posts: 1,252
Registered: ‎10-16-2008

Re: Airwave - cronjob keeps disappearing

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


Rob Gin
Senior QA Engineer - Network Services
Aruba Networks, a Hewlett Packard Enterprise Company
MVP
Posts: 1,418
Registered: ‎10-25-2011

Re: Airwave - cronjob keeps disappearing

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.
Pasquale Monardo | Senior Network Solutions Consultant
ACDX #420 | ACMP
[If you found my post helpful, please give kudos!]
Aruba
Posts: 1,285
Registered: ‎08-29-2007

Re: Airwave - cronjob keeps disappearing

Got it.  That's probably what happening here.

 

Thanks for the tip


If my post is helpful please give kudos, or mark as solved if it answers your post.

ACCP, ACMP, ACMX #294
mclarke@arubanetworks.com
Search Airheads
Showing results for 
Search instead for 
Did you mean: