Is there a way to make my phone turn off when the battery level is below 50%?

At the moment it does this when the battery level (or voltage) is critically low, but I want it to do it when there is still half the juice left.

A paid app would be fine too.