You could try Sentry. It also has a paid version.
Tired of accidentally leaving your WiFi running all day and wearing
down your device's battery? Tired of being home for hours and
forgetting to turn on your WiFi? Sentry can help!
Sentry is a fully automated WiFi manager that only requires a simple
configuration to start. It packs many features into a simple-to-use
application so you don't have to waste any time on setup.
Sentry operates by cycling your WiFi. If it gets a connection or was
already turned-on and connected, it remains on, otherwise, it turns
the WiFi off to save battery.
Even if Sentry is activated you can still manually connect to WiFi or
turn your WiFi without interrupting.
Sentry can be configured to run in any or all of three ways.
First, Sentry can be configured to run on a polling interval, e.g. 30
minutes, and check the WiFi status periodically.
Second, Sentry can set to check WiFi status every time the screen is
Last, Sentry can be set to run every time the phone boots up. Used in
conjunction with the other two functions, this can either be used to
make sure Sentry is always running or to simply check for WiFi every
time the phone reboots.
Does Sentry running in the background use up my battery life? Nope!
Not one bit! Sentry is actually only ever truly running when it's
cycling the WiFi, which depending on the timeout you set, shouldn't be
for much more than a minute, so no, it shouldn't negatively affect
your battery life.