Restarting only the wifi via schedule, possible?

Periodic network restart

A simple solution for restart all your network (lan, wan and wifi) every 10 minutes is this:
*/10 * * * * /etc/init.d/network restart


MY QUESTION

Is there a way to restart the wifi only???

You can do more then that :slight_smile: with openwrt!
Scripts

In archive there are scripts. Save to router, set cron as you need.
Disable wifi at certain time
Disable only one radio
Decrease and increase wifi power.

So, for example at evening decrease power to 1dbm, morning increase it to max.

Please, first test commands in shell so you can see if they working in your router. You can have different radio names.

(Im not profi, they are from forum)

1 Like

is there a way without using any scripts?

i just need to schedule wifi reboot at certain time intervals.

The wifi command will restart it

2 Likes

Its not too complicated:
Write to cron:

00 23 * * * /bin/sh /scripts/wifi2gdown.sh
00 06 * * * /bin/sh /scripts/wifi2gup.sh
# 30 22 * * * /bin/sh /scripts/wifi5gdown.sh
# 00 06 * * * /bin/sh /scripts/wifi5gup.sh
1 Like

any examples? like reboot wifi every 10hours.

Well in your first post, you showed an example of restarting the network every 10 minutes.

Just swap the command to wifi and change it to 10 hours instead of 10 minutes.
If you don't know how to do that, google "crontab guru"

1 Like
2 Likes

Why do you want to restart it?

* */10 * * * wifi restart

like this?

refresh the wifi connection

Get rid of "restart" on the end.

Yes, but why? If there is a bug bothering you it may be good to find it and fix it for all.