How can I set up Task Scheduler to automatically shut down my Plex server at 11 PM daily?
Asked by
ChillPanda42
I'm looking for a way to automate the shutdown of my Plex server using Task Scheduler, specifically to shut it down every day at 11 PM. I can handle it manually, but I often forget, and when I do, Plex runs updates in the background that end up crashing my PC. Any tips on how to accomplish this?
Answers
Instead of just scheduling a shutdown, you might want to figure out what's causing the issue in the first place. If you're looking to just kill the Plex service, you could use the `Stop-Service` command. It'll help you manage things without needing to restart your PC.
Reply to this answer
If it helps, you could use `shutdown.exe -r -t 0`, but just remember that this will restart your PC, not just shut down Plex. Make sure that's what you want to do!
Reply to this answer
Just make sure youโve got the right process name when setting up your script. I had issues with that before. If it runs fine manually but not from Task Scheduler, double-check your settings there!
ChillPanda42: I've used the right name, but it still doesn't work correctly with Task Scheduler. It runs but doesn't shut down Plex.
Reply to this answer
You'll want to set Task Scheduler to run a PowerShell script that includes your shutdown commands. Check out this step-by-step guide I found that walks you through the whole process. It makes things pretty straightforward! [Here's the link](https://o365reports.com/2019/08/02/schedule-powershell-script-task-scheduler/).
Reply to this answer
You can find the process name and use `Stop-Process -Name yourProcessName` to tackle the issue. It's fairly easy! Also, don't forget to look into the potential root causes of why the PC crashes.
Reply to this answer
Add your answer
Answers are reviewed before publication.
ChillPanda42: Iโm not really sure whatโs causing the problem, and Iโm still learning about all of this. Can you point me to any resources that might help?