by Danamir Anduin
Turn on the WiFi for 10mn every 2 hours during the day (8:00 - 22:00). Disable it during the night.
If the WiFi is manually on, leave it enabled.
This version use sudo "svc wifi enable/disable" method instead of standard Wifi API calls, as those have been deprecated by Google in Android 10.
(This version use exact timers, that are more battery intensive. You can try the normal version to alleviate battery usage.)