I'm trying to set up my PC to automatically shut down my Plex server at 11 PM every night using Task Scheduler. I can do it manually, but I often forget, and when that happens, Plex updates run in the background and cause my PC to crash and restart. I'm looking for help to automate this so it runs smoothly without my intervention.
4 Answers
A simple command, like `Shutdown.exe -r -t 0`, can reboot your PC, but just so you know, it might turn everything off instead of just Plex. Make sure to double-check that before you run it!
Have you thought about figuring out why Plex is doing those updates? If you want to get around the issue, using `Stop-Service` to kill the Plex service might be a straightforward fix for you. That way, you don't even have to shut down the PC completely.
To automate the shutdown, you can set Task Scheduler to launch PowerShell and point it to your shutdown script. If you need a detailed guide, there's a step-by-step tutorial you can check out [here](https://o365reports.com/2019/08/02/schedule-powershell-script-task-scheduler/). It's a handy way to set everything up properly!
Ensure you're using the correct process name for Plex. If the script runs correctly when you execute it manually but fails with Task Scheduler, it might be a case of the script not recognizing the context it's running in.
Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures