I have a rooted Lenovo Vibe K5 Plus (A6020a46) running TWRP + Arrow OS. It doesn't provide an automatically scheduled reboot out of the box. None of the apps worked. Also the apps that claim to provide this functionality are suspiciously ad-filled and I'm not comfortable giving root permission to them.
So, here is what I've tried till now:
SMManager. Didn't work. Also, suspicious app.
Wrote an infinite loop shell script, but I'm afraid it'll make my system too busy:
while true; do if [[ "$(date +"%H")" -eq "3" ]] ; then reboot fi done
But I don't know how to autorun it on boot and I'm afraid it'll break my Android
Tried Termux (elevated) with
0 3 * * * /system/bin/sh rebootin
/data/crontab/rootlike mentioned in this link, but
crondisn't recognised as a valid command in root shell.
init.d directory doesn't even exist, but an
init directory does with a bunch of
sudo crontab /data/crontab and then
crontab -l lists the proper crontab, but it doesn't show up anywhere else. I'm not sure it will work. Further, I'll have to always manually run this (as far as I understand it) and seriously manually rebooting is infinitely easier.
I'm out of ideas. Any suggestions appreciated. I'd prefer shell scripts over shady apps.