This is how the Doze app works
Doze is a technology in the new Android version that reduces battery consumption in standby mode drastically. The function disables background processes from a time when you are not using your device. For now, however, you benefit from Doze only if you have a device with Android Marshmallow like the Nexus One or HTC 6P A9.
The Doze app mimics the function by creating a VPN, then you can determine which applications can and can not synchronize and use the data connection when the screen is off. Unlike Doze on Android Marshmallow, turns the app starts directly if you turn off the screen and not after half an hour of inactivity. That way your smartphone has considerably longer battery life, as app-synchronization, which requires a lot of battery, is limited.
The Doze app works as stated not only with Android Marshmallow, but is compatible with Android 4.1 and newer. The app functions slightly differently than energy-saving modes that are delivered by manufacturers with their device since synchronization immediately starts again when you turn on the screen. You do not have to dive into the settings to turn it on or off.