An app that lets wifi run in intervals in sleep mode?

A

AC Question

I've been having some trouble with some noticable battery drain in sleep mode(about 4-5% per hour) and noticed that if I turn off wifi, my battery will hold its charge MUCH better(my battery will discharge about 0.3-0.7% per hour). Now I've used a wakelock detector to see if there's anything keeping my phone awake but nothing showed up. I could change the wifi setting to stay off in sleep mode, but I still want to receive all e-mails, notifications and messages. I also know there's a lot of apps that will toggle wifi depending on wether there is a connection or not, but what I want is an app that detects that the phone is in sleep mode and is connected to wifi in the first place and if so will only let the wifi run in short intervals(every 30 mins the wifi will turn on for say, a minute and turn off again) until the phone is unlocked. Anyone know an app that does this? Thanks in advance