I have installed the chkWAN script following the instructions in https://github.com/MartineauUK/Chk-WAN.
Now I'm trying to have it installed in cron for automated monitoring.
I have done this:
But this is just updating the wan-event script.
In order to add the cron job
I needed to add it manually with
Is this the right way ?
Now I'm trying to have it installed in cron for automated monitoring.
I have done this:
Code:
cat > /jffs/scripts/wan-event << EOF;chmod +x /jffs/scripts/wan-event
#!/bin/sh
if [ "\$2" == "connected" ];then
# sleep 5
# No need for recommended 'sleep n' as ChkWAN.sh has default 10 secs delay
# Check WAN connectivity every 5 minutes
sh /jffs/scripts/ChkWAN.sh cron="\*/5 \* \* \* \*" &
fi
EOF
But this is just updating the wan-event script.
In order to add the cron job
Code:
*/5 * * * * /jffs/scripts/ChkWAN.sh #WAN_Check#
Code:
crontab -e