by CS Student
Checks if device is unlocked at 12:00 am Sun/Mon/Thu/Fri/Sat (Please modify it if you want) . Turns off phone if locked. If unlocked, wait till 3:30 am and checks again. Will turn off if locked or wait till 12:00 am next day and do the same thing over again.