Forum Discussion
How to schedule script on F5 unit.
Hello.. We are having F5 boxes (LTM/GTM). We have prepared below script to send an email if the CONFIG-STATUS is not SYNC then send an email to our DL. We do not have a testing environment. Can someone assist us how to schedule the below script to run every 12 hours or once in every 24 hours.
!/usr/bin/bashcol=
tmsh show /cm sync-status | grep Color | awk -F" " '{print $2}'
HOSTNAME=grep HOSTNAME /etc/sysconfig/network | awk -F"=" '{print $2}'
if [ $col != $ACTIVE ];
then
echo "Sync is not working."| mailx -s "SYNC Alert from $HOSTNAME" $EMAIL
fi- kolom
Altostratus
Hello rohitbarolia,
- Create and test your script.
cd /home/admin
vi SyncCheck.sh , and paste your script
chmod a+x SyncCheck.sh
sh SyncCheck.sh
- Schedule the execution of the script
Cd /etc
nano crontab , and add one of these this line at the end of the file.
@daily /home/admin/SyncCheck.sh >/dev/null 2>&1 Every day
- Stanislas_Piro2
Cumulonimbus
To schedule script on tmos, use icall feature.
- Create your script in /shared directory
-
enter in tmsh
- create a iCall script executing your script
- create a periodic iCall handler calling the iCal la script
Recent Discussions
Related Content
* 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