Hello,
For this, you can use ping reboot functionality. With this functionality configured, the device will ping a host on the internet. In case pings to your defined host on the internet fail, the modem will automatically restart. Alternatively, it can be set to reboot the whole device. You can find more information here.
Kind Regards,
Andzej