Sometimes servers need to update its status or reboot by the condition to return its status to the best working environment to remove junk process or something like that. You can check that status by shell script.

Below script makes server to reboot if ping does not work:

#!/bin/bash
:Begin
ping -c 10 google.com
If %errorlevel% == 1 (
        echo noreply
        shutdown -r -t 0
)
If %errorlevel% == 0 (
        GoTo :End
)
:End

In my case, I run above scripts by cron job in every 10 mins.

If you want to run above script at AsusWRT, you will need to modify the first line as following

#!/bin/sh

Below code works more accurately at AsusWRT

/jffs/scripts/reboot_if_ping_does_not_work
#!/bin/ash

if [ $( ping -c 1 google.com | grep ttl | wc -l ) -eq 0 ]
then
        echo noreply
        /sbin/reboot
else
        echo "google.com is reachable"
fi