Scheduled Restart Help

New Contributor


I found this script and made changes to reflect what I needed but it seems the StartCalendarInterval is not working. It triggers the first time but then it does not run again at the time its schedule even if the computer is awake. Iv tested by keeping it awake and changing the time on the mac. 


echo "<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
</plist>" > /Library/LaunchDaemons/com.Org.shutdown.plist

chown root "/Library/LaunchDaemons/com.Org.shutdown.plist"
chmod 644 "/Library/LaunchDaemons/com.Org.shutdown.plist"
launchctl load -w "/Library/LaunchDaemons/com.Org.shutdown.plist"



Valued Contributor

LaunchDaemons run once at boot. If you do not reboot the mac they do not run again, untill the Mac reboots.
I use a script to set powermanagement.

pmset repeat shutdown MTWRFS 21:00:00 wakeorpoweron MTWRFS 08:00:00
This wakes or boots at 08:00 in the mornings, on weekdays and Saturdays, and then shuts the Mac down at 21:00 on those same days.
To get rid of this use

pmset repeat cancel