I’ve finally got around to publishing a simple script that I use to automatically shut down a Plex server.
This script is useful for people who have no requirement to run their Plex server 24/7 and have periods of time where no-one is using their server. I power my Plex server off between midnight and 6am.
The script won’t trigger a shutdown if anything is being streamed, transcoded or downloaded. It also won’t trigger a shutdown if the machine has recently been rebooted - this means that if you decide to have a late night (and power on your server), the script won’t promptly shut it down again.
There are two scripts, one for Windows users and another for Linux users.
Enjoy.