There wasn’t an elegant way to set the specific times I wanted my computer to shut down.
You could change the script to check the time and configure cron to run it every 30 minutes, all day.
H=$(date +%H)if [ $H -gt 8 ] || [ $H -lt 22 ]; then # Don't try to shut down exitfi# Script to try to shut down goes here
You could change the script to check the time and configure cron to run it every 30 minutes, all day.