May 9, 2022

Restart Openwrt router periodically at specific time

SSH to the Openwrt router

ssh root@<router ip> 

Enter following command to edit the CRON job

crontab -e

Add the following line there

0 8,20 * * * sleep 70 && touch /etc/banner && reboot 
//cron expression details: 8am, 8pm daily

save the file (press ESCAPE and then :wq), 

Now restart the cron service with following command

/etc/init.d/cron restart
This will reboot the router everyday at 08:00 AM and 08:00 PM