Turn off programmatic

For adb on a rooted phone you run an su command like this

worth a try.

Just out of interest, if you manage to actually turn the phone off (power off) how will you turn it back on if your power button doesn’t work ?

I am looking for a programmatic shutdown of my cell phone.

For example: I would like my cell phone to turn off in 20 minutes, without my interference.

Soon I would put the clock inside the apk to fire and force shutdown in 20 minutes.