Here is a simple app from @bravenel that turns off a number of devices with retry....
It works well for me.