Skip to content

Instantly share code, notes, and snippets.

@qpwo
Created October 23, 2023 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qpwo/50b6fd0f5cef7ca64fc7b6f0729e56a8 to your computer and use it in GitHub Desktop.
Save qpwo/50b6fd0f5cef7ca64fc7b6f0729e56a8 to your computer and use it in GitHub Desktop.
macos ventura force shutdown daily (and wake up from sleep)
# make a cron job
sudo crontab -e
# add this line to shutdown every day at 2:00AM:
# 0 2 * * * /sbin/shutdown -h now
# check your cron job is there:
sudo crontab -l
# the job won't run if computer is asleep. Wake up first to run it.
sudo pmset repeat wake MTWRFSU 01:59:00
# check your schedule worked:
pmset -g sched
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment