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/bash

col=

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

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

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