Shutdown Issue

I’m currently running a python program on my beaglebone black, and I’m running into some issues shutting it off. The python script is run at start-up from a bash file. The python code itself does some basic calculations, sends an email out with information gathered on the board, and then powers down with the bash command.

`
sudo shutdown -h now

`
After 1 minute of down time, the beaglebone is then automatically turned back on by the power cape from Andice labs. The beaglebone is then supposed to repeat this cycle until its batteries die. However, I have not been able to cycle for more than two hours. Seemingly at random, I will stop receiving the notification emails. When I go to check on the beaglebone, I notice that all of the lights are off except for the Power LED. The the heartbeat USR0 LED is off which I believe indicates that the operating system is not currently running, but the beaglebone does not appear to be completely off as it should be. Should I attempt to power off the beaglebone another way? Is it possible that the issue is due to the power cape? I’m not quite certain what the root of the problem is.