Forum Discussion
Mic_108850
Altostratus
Apr 13, 2010"b" command in a crontab
Hi,
i'd like to set up a schedulded task on my BIG-IP LTM
The script should be run each day at the following hour:
09:10 and 11:10
The command included is to clear the RAMCACHE profile below:
b profile http TEST delete all entry
How to write a script included this command and how to create the crontab?
Thank you for your help
Mic
- hoolio
Cirrostratus
Hi Mic, - Mic_108850
Altostratus
Thank you Aaron for your quick answer. - hoolio
Cirrostratus
You could add logging to the script to see what it's doing. Replace the existing script with this named /root/ramcache.clear.bashSave the output file name as the script name OUT=/var/log/`basename $0`.out Print the date and script name echo "`date +%Y%m%d_%H%M%S`: `basename $0`: starting" >> $OUT List the current RAM cache entries for one HTTP profile echo "Entries before delete:" >> $OUT b profile http MY_HTTP_PROFILE ramcache entry show >> $OUT Delete current RAM cache entries for one HTTP profile b profile http MY_HTTP_PROFILE ramcache entry all delete List the current RAM cache entries for one HTTP profile echo "Entries after delete:" >> $OUT b profile http MY_HTTP_PROFILE ramcache entry show >> $OUT
- hoolio
Cirrostratus
Hi Mic, - Mic_108850
Altostratus
when i run the script directly i have: - hoolio
Cirrostratus
Can you make the script executable by root: - Mic_108850
Altostratus
ok the script runs correctly when i start it manually - Mic_108850
Altostratus
for information i don't see a /bin/ps1 in my big-ip but only a /bin/ps - Mic_108850
Altostratus
Great it works with crontab - hoolio
Cirrostratus
Good to hear. Yeah, that should be a safe way to check for the failover status in any LTM version.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects