Automatic progtam-controlled power distribution cabinet